Package frc.robot.systems
Class IntakeFSMSystem
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGetter for intake motor velocity.doubleGetter for intake motor voltage.Getter for intake current state.doubleGetter for pivot motor left voltage.doubleGetter for pivot motor position.doubleGetter for pivot motor right current.doubleGetter for pivot motor right voltage.doubleGetter for pivot motor velocity.booleanGetter for intake motor voltage.booleanGetter for intake motor voltage.booleanGetter for the result of the elevator's top limit switch.booleanGetter for the result of the elevator's top limit switch.protected IntakeFSMSystem.IntakeFSMStateGet the next state for the FSM based on inputs.voidreset()resets the FSM_STATE.voidupdates the current state in IntakeFSMState.Methods inherited from class frc.robot.systems.FSMSystem
getCurrentState, setCurrentState, watchForStatesCommand
-
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:
resetin classFSMSystem<IntakeFSMSystem.IntakeFSMState>
-
update
updates the current state in IntakeFSMState.- Specified by:
updatein classFSMSystem<IntakeFSMSystem.IntakeFSMState>- Parameters:
input-
-
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
Description copied from class:FSMSystemGet the next state for the FSM based on inputs.- Specified by:
nextStatein classFSMSystem<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
-