Class RobotModeTriggers
java.lang.Object
edu.wpi.first.wpilibj2.command.button.RobotModeTriggers
public final class RobotModeTriggers extends Object
A class containing static
Trigger
factories for running callbacks when the robot mode
changes.-
Method Summary
Modifier and Type Method Description static Trigger
autonomous()
Returns a trigger that is true when the robot is enabled in autonomous mode.static Trigger
disabled()
Returns a trigger that is true when the robot is disabled.static Trigger
teleop()
Returns a trigger that is true when the robot is enabled in teleop mode.static Trigger
test()
Returns a trigger that is true when the robot is enabled in test mode.
-
Method Details
-
autonomous
Returns a trigger that is true when the robot is enabled in autonomous mode.- Returns:
- A trigger that is true when the robot is enabled in autonomous mode.
-
teleop
Returns a trigger that is true when the robot is enabled in teleop mode.- Returns:
- A trigger that is true when the robot is enabled in teleop mode.
-
disabled
Returns a trigger that is true when the robot is disabled.- Returns:
- A trigger that is true when the robot is disabled.
-
test
Returns a trigger that is true when the robot is enabled in test mode.- Returns:
- A trigger that is true when the robot is enabled in test mode.
-