WPI_Handle WPI_EventHandle
An event handle.
Definition: Synchronization.h:25
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:23
static std::string GetGameSpecificMessage()
Returns the game specific message provided by the FMS.
static int GetReplayNumber()
Returns the number of times the current match has been replayed from the FMS.
static int GetStickButtons(int stick)
The state of the buttons on the joystick.
static bool IsDSAttached()
Check if the DS is attached.
static std::string GetEventName()
Returns the name of the competition event provided by the FMS.
static double GetStickAxis(int stick, int axis)
Get the value of the axis on a joystick.
static std::string GetJoystickName(int stick)
Returns the name of the joystick at the given port.
static bool IsTeleopEnabled()
Check if the DS is commanding teleop mode and if it has enabled the robot.
static bool IsTest()
Check if the DS is commanding test mode.
static bool IsDisabled()
Check if the robot is disabled.
Alliance
The robot alliance that the robot is a part of.
Definition: DriverStation.h:28
@ kBlue
Blue alliance.
Definition: DriverStation.h:32
@ kRed
Red alliance.
Definition: DriverStation.h:30
static MatchType GetMatchType()
Returns the type of match being played provided by the FMS.
static int GetStickAxisCount(int stick)
Returns the number of axes on a given joystick port.
static bool IsAutonomousEnabled()
Check if the DS is commanding autonomous mode and if it has enabled the robot.
static units::second_t GetMatchTime()
Return the approximate match time.
static void RemoveRefreshedDataEventHandle(WPI_EventHandle handle)
Unregisters the given handle from DS data refresh notifications.
static bool IsJoystickConnected(int stick)
Returns if a joystick is connected to the Driver Station.
static int GetJoystickType(int stick)
Returns the type of joystick at a given port.
static std::optional< Alliance > GetAlliance()
Get the current alliance from the FMS.
static bool IsTeleop()
Check if the DS is commanding teleop mode.
static bool GetJoystickIsXbox(int stick)
Returns a boolean indicating if the controller is an xbox controller.
static bool IsEnabled()
Check if the DS has enabled the robot.
MatchType
The type of robot match that the robot is part of.
Definition: DriverStation.h:38
@ kQualification
Qualification.
Definition: DriverStation.h:44
@ kPractice
Practice.
Definition: DriverStation.h:42
@ kElimination
Elimination.
Definition: DriverStation.h:46
@ kNone
None.
Definition: DriverStation.h:40
static bool GetStickButtonReleased(int stick, int button)
Whether one joystick button was released since the last check.
static bool IsJoystickConnectionWarningSilenced()
Returns whether joystick connection warnings are silenced.
static bool IsAutonomous()
Check if the DS is commanding autonomous mode.
static bool WaitForDsConnection(units::second_t timeout)
Wait for a DS connection.
static int GetJoystickAxisType(int stick, int axis)
Returns the types of Axes on a given joystick port.
static bool GetStickButton(int stick, int button)
The state of one joystick button.
static void StartDataLog(wpi::log::DataLog &log, bool logJoysticks=true)
Starts logging DriverStation data to data log.
static std::optional< int > GetLocation()
Return the driver station location from the FMS.
static int GetStickPOV(int stick, int pov)
Get the state of a POV on the joystick.
static void RefreshData()
Copy data from the DS task for the user.
static double GetBatteryVoltage()
Read the battery voltage.
static bool IsTestEnabled()
Check if the DS is commanding Test mode and if it has enabled the robot.
static void SilenceJoystickConnectionWarning(bool silence)
Allows the user to specify whether they want joystick connection warnings to be printed to the consol...
static bool IsEStopped()
Check if the robot is e-stopped.
static int GetStickButtonCount(int stick)
Returns the number of buttons on a given joystick port.
static int GetStickPOVCount(int stick)
Returns the number of POVs on a given joystick port.
static constexpr int kJoystickPorts
Number of Joystick ports.
Definition: DriverStation.h:50
static void ProvideRefreshedDataEventHandle(WPI_EventHandle handle)
Registers the given handle for DS data refresh notifications.
static bool IsFMSAttached()
Is the driver station attached to a Field Management System?
static int GetMatchNumber()
Returns the match number provided by the FMS.
static bool GetStickButtonPressed(int stick, int button)
Whether one joystick button was pressed since the last check.
A data log.
Definition: DataLog.h:90
dimensionless::scalar_t log(const ScalarUnit x) noexcept
Compute natural logarithm.
Definition: math.h:349
Definition: AprilTagPoseEstimator.h:15
Definition: ntcore_cpp.h:31