diff --git a/src/main/java/frc/robot/subsystems/SystemState.java b/src/main/java/frc/robot/subsystems/SystemState.java index 6a8bd06..7c5f3a7 100644 --- a/src/main/java/frc/robot/subsystems/SystemState.java +++ b/src/main/java/frc/robot/subsystems/SystemState.java @@ -1,11 +1,25 @@ package frc.robot.subsystems; public interface SystemState { + /** + * Initial action of state. Called once when state is initially scheduled + */ public default void initialize() {} + /** + * Main body of state. Called repeatedly when state is scheduled. + */ public default void execute() {} + /** + * The action to take when the state ends. Called when either the state finishes normally, or when it interrupted/canceled. + * @param interrupted Whether the state was interrupted or cancelled + */ public default void end(boolean interrupted) {} + /** + * Get next state based on variety of inputs. Also used to know if current state is complete. + * @return Next state + */ public SystemState nextState(); }