Package frc.robot.systems
Class KitBotShooterFSM
- java.lang.Object
-
- frc.robot.systems.KitBotShooterFSM
-
public class KitBotShooterFSM extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKitBotShooterFSM.ShooterFSMState
-
Constructor Summary
Constructors Constructor Description KitBotShooterFSM()Create FSMSystem and initialize to starting state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KitBotShooterFSM.ShooterFSMStategetCurrentState()Return current FSM state.voidreset()Reset this system to its start state.voidupdate(TeleopInput input)Update FSM based on new inputs.booleanupdateAutonomous(AutoHandlerSystem.AutoFSMState autoState)Performs specific action based on the autoState passed in.
-
-
-
Method Detail
-
getCurrentState
public KitBotShooterFSM.ShooterFSMState 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 reenabled.
-
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.
-
updateAutonomous
public boolean updateAutonomous(AutoHandlerSystem.AutoFSMState autoState)
Performs specific action based on the autoState passed in.- Parameters:
autoState- autoState that the subsystem executes.- Returns:
- if the action carried out in this state has finished executing
-
-