Package frc.robot.systems
Class LEDFSMSystem
java.lang.Object
frc.robot.systems.LEDFSMSystem
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLEDFSMSystem
(DriveFSMSystem driveSystem, FunnelFSMSystem funnelSystem, ClimberFSMSystem climberSystem) Create a LEDFSMSystem and initialize to starting state. -
Method Summary
Modifier and TypeMethodDescriptionReturn current FSM state.void
reset()
Reset this system to its start state.void
update
(TeleopInput input) Update FSM based on new inputs.void
Run FSM in autonomous mode.void
Calls all logging and telemetry to be updated periodically.
-
Constructor Details
-
LEDFSMSystem
public LEDFSMSystem(DriveFSMSystem driveSystem, FunnelFSMSystem funnelSystem, ClimberFSMSystem climberSystem) Create a LEDFSMSystem 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.- Parameters:
driveSystem
- the drive FSM.funnelSystem
- the funnel FSM.climberSystem
- the climber FSM.
-
-
Method Details
-
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
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 void updateAutonomous()Run FSM in autonomous mode. This function only calls the FSM state specific handlers. -
updateLogging
public void updateLogging()Calls all logging and telemetry to be updated periodically.
-