[wpilib] Add isTestEnabled and minor docs cleanup (#5172)

This commit is contained in:
Ryan Blue
2023-03-10 22:23:57 -05:00
committed by GitHub
parent e5c4c6b1a7
commit 32ec5b3f75
6 changed files with 69 additions and 19 deletions

View File

@@ -209,6 +209,14 @@ class DriverStation final {
*/
static bool IsTest();
/**
* Check if the DS is commanding Test mode and if it has enabled the robot.
*
* @return True if the robot is being commanded to be in Test mode and
* enabled.
*/
static bool IsTestEnabled();
/**
* Check if the DS is attached.
*

View File

@@ -129,14 +129,14 @@ class RobotBase {
/**
* Determine if the Robot is currently enabled.
*
* @return True if the Robot is currently enabled by the field controls.
* @return True if the Robot is currently enabled by the Driver Station.
*/
bool IsEnabled() const;
/**
* Determine if the Robot is currently disabled.
*
* @return True if the Robot is currently disabled by the field controls.
* @return True if the Robot is currently disabled by the Driver Station.
*/
bool IsDisabled() const;
@@ -144,7 +144,7 @@ class RobotBase {
* Determine if the robot is currently in Autonomous mode.
*
* @return True if the robot is currently operating Autonomously as determined
* by the field controls.
* by the Driver Station.
*/
bool IsAutonomous() const;
@@ -152,7 +152,7 @@ class RobotBase {
* Determine if the robot is currently in Autonomous mode and enabled.
*
* @return True if the robot us currently operating Autonomously while enabled
* as determined by the field controls.
* as determined by the Driver Station.
*/
bool IsAutonomousEnabled() const;
@@ -160,7 +160,7 @@ class RobotBase {
* Determine if the robot is currently in Operator Control mode.
*
* @return True if the robot is currently operating in Tele-Op mode as
* determined by the field controls.
* determined by the Driver Station.
*/
bool IsTeleop() const;
@@ -168,18 +168,26 @@ class RobotBase {
* Determine if the robot is current in Operator Control mode and enabled.
*
* @return True if the robot is currently operating in Tele-Op mode while
* wnabled as determined by the field-controls.
* enabled as determined by the Driver Station.
*/
bool IsTeleopEnabled() const;
/**
* Determine if the robot is currently in Test mode.
*
* @return True if the robot is currently running tests as determined by the
* field controls.
* @return True if the robot is currently running in Test mode as determined
* by the Driver Station.
*/
bool IsTest() const;
/**
* Determine if the robot is current in Test mode and enabled.
*
* @return True if the robot is currently operating in Test mode while
* enabled as determined by the Driver Station.
*/
bool IsTestEnabled() const;
/**
* Gets the ID of the main robot thread.
*/