Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed Sep 14, 2024
1 parent 4728745 commit 312b7ae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/frc/robot/subsystems/SystemState.java
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit 312b7ae

Please sign in to comment.