WPILibC++ 2024.3.2
RobotModeTriggers.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
8
9namespace frc2 {
10
11/**
12 * A class containing static Trigger factories for running callbacks when robot
13 * mode changes.
14 */
16 public:
18
19 /**
20 * Returns a trigger that is true when the robot is enabled in autonomous
21 * mode.
22 *
23 * @return A trigger that is true when the robot is enabled in autonomous
24 * mode.
25 */
27
28 /**
29 * Returns a trigger that is true when the robot is enabled in teleop mode.
30 *
31 * @return A trigger that is true when the robot is enabled in teleop mode.
32 */
33 static Trigger Teleop();
34
35 /**
36 * Returns a trigger that is true when the robot is disabled.
37 *
38 * @return A trigger that is true when the robot is disabled.
39 */
40 static Trigger Disabled();
41
42 /**
43 * Returns a trigger that is true when the robot is enabled in test mode.
44 *
45 * @return A trigger that is true when the robot is enabled in test mode.
46 */
47 static Trigger Test();
48};
49
50} // namespace frc2
A class containing static Trigger factories for running callbacks when robot mode changes.
Definition: RobotModeTriggers.h:15
static Trigger Test()
Returns a trigger that is true when the robot is enabled in test 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 Autonomous()
Returns a trigger that is true when the robot is enabled in autonomous mode.
This class provides an easy way to link commands to conditions.
Definition: Trigger.h:31
Definition: TrapezoidProfileSubsystem.h:12