-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff1357a
commit ddb2e87
Showing
13 changed files
with
287 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,77 @@ | ||
package dev.vexide.hydrozoa; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* A robot that can be used in a competition. Classes implementing this interface can be used with the competition | ||
* runtime to control what the robot does in different states. | ||
* | ||
* @see CompetitionRuntime#start(Function) | ||
*/ | ||
public interface CompetitionRobot { | ||
/** | ||
* Called when the robot is connected to the field. | ||
*/ | ||
default void connected() { | ||
} | ||
|
||
/** | ||
* Called when the robot is disconnected from the field. | ||
*/ | ||
default void disconnected() { | ||
} | ||
|
||
/** | ||
* Called when the robot switches to the disabled mode. | ||
*/ | ||
default void disabledInit() { | ||
} | ||
|
||
/** | ||
* Called periodically while the robot is disabled. | ||
*/ | ||
default void disabledPeriodic() { | ||
} | ||
|
||
/** | ||
* Called when the robot exits the disabled mode. | ||
*/ | ||
default void disabledExit() { | ||
} | ||
|
||
/** | ||
* Called when the robot switches to the autonomous mode. | ||
*/ | ||
default void autonomousInit() { | ||
} | ||
|
||
/** | ||
* Called periodically while the robot is in the autonomous mode. | ||
*/ | ||
default void autonomousPeriodic() { | ||
} | ||
|
||
/** | ||
* Called when the robot exits the autonomous mode. | ||
*/ | ||
default void autonomousExit() { | ||
} | ||
|
||
/** | ||
* Called when the robot switches to the driver mode. | ||
*/ | ||
default void driverInit() { | ||
} | ||
|
||
/** | ||
* Called periodically while the robot is in the driver mode. | ||
*/ | ||
default void driverPeriodic() { | ||
} | ||
|
||
/** | ||
* Called when the robot exits the driver mode. | ||
*/ | ||
default void driverExit() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.