[wpilib, hal] Add function to read the RSL state (#5312)

This commit is contained in:
Ryan Blue
2023-05-13 00:30:19 -04:00
committed by GitHub
parent 7a90475eec
commit 463a90f1df
8 changed files with 59 additions and 0 deletions

View File

@@ -423,6 +423,15 @@ HAL_Bool HAL_GetBrownedOut(int32_t* status) {
return !(watchdog->readStatus_PowerAlive(status));
}
HAL_Bool HAL_GetRSLState(int32_t* status) {
hal::init::CheckInit();
if (!global) {
*status = NiFpga_Status_ResourceNotInitialized;
return false;
}
return global->readLEDs_RSL(status);
}
static bool killExistingProgram(int timeout, int mode) {
// Kill any previous robot programs
std::fstream fs;