mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpilib] RobotController: Add isSystemTimeValid() (#5696)
This returns true when the system date/time (wall clock) is valid.
This commit is contained in:
@@ -87,6 +87,13 @@ bool RobotController::GetRSLState() {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool RobotController::IsSystemTimeValid() {
|
||||
int32_t status = 0;
|
||||
bool retVal = HAL_GetSystemTimeValid(&status);
|
||||
FRC_CheckErrorStatus(status, "IsSystemTimeValid");
|
||||
return retVal;
|
||||
}
|
||||
|
||||
double RobotController::GetInputVoltage() {
|
||||
int32_t status = 0;
|
||||
double retVal = HAL_GetVinVoltage(&status);
|
||||
|
||||
@@ -115,6 +115,13 @@ class RobotController {
|
||||
*/
|
||||
static bool GetRSLState();
|
||||
|
||||
/**
|
||||
* Gets if the system time is valid.
|
||||
*
|
||||
* @return True if the system time is valid, false otherwise
|
||||
*/
|
||||
static bool IsSystemTimeValid();
|
||||
|
||||
/**
|
||||
* Get the input voltage to the robot controller.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user