Class IntakeFSMSystem


public class IntakeFSMSystem extends FSMSystem<IntakeFSMSystem.IntakeFSMState>
  • Constructor Details

    • IntakeFSMSystem

      public IntakeFSMSystem()
      Create FSMSystem 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

    • reset

      public void reset()
      resets the FSM_STATE.
      Specified by:
      reset in class FSMSystem<IntakeFSMSystem.IntakeFSMState>
    • update

      public void update(Input input)
      updates the current state in IntakeFSMState.
      Specified by:
      update in class FSMSystem<IntakeFSMSystem.IntakeFSMState>
      Parameters:
      input -
    • getIntakeState

      public IntakeFSMSystem.IntakeFSMState getIntakeState()
      Getter for intake current state.
      Returns:
      intake current state.
    • getIntakeMotorVelocity

      public double getIntakeMotorVelocity()
      Getter for intake motor velocity.
      Returns:
      intake motor velocity as a double
    • getPivotMotorVelocity

      public double getPivotMotorVelocity()
      Getter for pivot motor velocity.
      Returns:
      pivot motor velocity as a double
    • getPivotMotorPos

      public double getPivotMotorPos()
      Getter for pivot motor position.
      Returns:
      intake motor position as a double
    • getIntakeMotorVolatge

      public double getIntakeMotorVolatge()
      Getter for intake motor voltage.
      Returns:
      intake motor voltage as a double
    • getPivotMotorLeftVolatge

      public double getPivotMotorLeftVolatge()
      Getter for pivot motor left voltage.
      Returns:
      pivot motor left voltage as a double
    • getPivotMotorRightVoltage

      public double getPivotMotorRightVoltage()
      Getter for pivot motor right voltage.
      Returns:
      pivot motor right voltage as a double
    • getPivotMotorRightCurrent

      public double getPivotMotorRightCurrent()
      Getter for pivot motor right current.
      Returns:
      pivot motor right current as a double
    • isAtBottomLimit

      public boolean isAtBottomLimit()
      Getter for intake motor voltage.
      Returns:
      intake motor voltage as a double
    • isAtTopLimit

      public boolean isAtTopLimit()
      Getter for intake motor voltage.
      Returns:
      intake motor voltage as a double
    • nextState

      protected IntakeFSMSystem.IntakeFSMState nextState(Input input)
      Description copied from class: FSMSystem
      Get the next state for the FSM based on inputs.
      Specified by:
      nextState in class FSMSystem<IntakeFSMSystem.IntakeFSMState>
      Parameters:
      input - the input object
      Returns:
      the next state
    • isIntakeDownRunning

      public boolean isIntakeDownRunning()
      Getter for the result of the elevator's top limit switch.
      Returns:
      whether the limit is reached
    • isIntakeDown

      public boolean isIntakeDown()
      Getter for the result of the elevator's top limit switch.
      Returns:
      whether the limit is reached