mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[wpilib, hal] Add function to read the RSL state (#5312)
This commit is contained in:
@@ -76,6 +76,13 @@ bool RobotController::IsBrownedOut() {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool RobotController::GetRSLState() {
|
||||
int32_t status = 0;
|
||||
bool retVal = HAL_GetRSLState(&status);
|
||||
FRC_CheckErrorStatus(status, "GetRSLState");
|
||||
return retVal;
|
||||
}
|
||||
|
||||
double RobotController::GetInputVoltage() {
|
||||
int32_t status = 0;
|
||||
double retVal = HAL_GetVinVoltage(&status);
|
||||
|
||||
@@ -101,6 +101,12 @@ class RobotController {
|
||||
*/
|
||||
static bool IsBrownedOut();
|
||||
|
||||
/**
|
||||
* Gets the current state of the Robot Signal Light (RSL)
|
||||
* @return The current state of the RSL- true if on, false if off
|
||||
*/
|
||||
static bool GetRSLState();
|
||||
|
||||
/**
|
||||
* Get the input voltage to the robot controller.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user