Class ClimberFSMSystem

java.lang.Object
frc.robot.systems.ClimberFSMSystem

public class ClimberFSMSystem extends Object
  • Constructor Details

    • ClimberFSMSystem

      public ClimberFSMSystem()
      Create ClimberFSMSystem and initialize to starting state. Also perform any one-time initialization or configuration of hardware required. Note the constructor is called only once when the robot boots.
  • Method Details

    • getCurrentState

      public ClimberFSMSystem.ClimberFSMState getCurrentState()
      Return current FSM state.
      Returns:
      Current FSM state
    • reset

      public void reset()
      Reset this system to its start state. This may be called from mode init when the robot is enabled.

      Note this is distinct from the one-time initialization in the constructor as it may be called multiple times in a boot cycle, Ex. if the robot is enabled, disabled, then enabled.

    • update

      public void update(TeleopInput input)
      Update FSM based on new inputs. This function only calls the FSM state specific handlers.
      Parameters:
      input - Global TeleopInput if robot in teleop mode or null if the robot is in autonomous mode.
    • updateLogging

      public void updateLogging()
      Updates the logging for the climber system.
    • setState

      public void setState(ClimberFSMSystem.ClimberFSMState state)
      Set the state of the FSM.
      Parameters:
      state - The state to set the FSM to.
    • isClimberStowed

      public boolean isClimberStowed()
      Indicates whether the climber position is in the range for being STOWED.
      Returns:
      if the climber is STOWED
    • isClimberExtended

      public boolean isClimberExtended()
      Indicates whether the climber position is in the range for being EXTENDED.
      Returns:
      if the climber is EXTENDED
    • isClimberClimbed

      public boolean isClimberClimbed()
      Indicates whether the climber position is in the range for being CLIMBED.
      Returns:
      if the climber is CLIMBED