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 Details

    • autonomous

      public static Trigger 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

      public static Trigger 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

      public static Trigger disabled()
      Returns a trigger that is true when the robot is disabled.
      Returns:
      A trigger that is true when the robot is disabled.
    • test

      public static Trigger 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.