mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal] Expose more FPGA functionality (#6942)
- function to reset user rail fault counters - function to get comms disable count - correct docs for user rail count functions
This commit is contained in:
@@ -84,6 +84,13 @@ bool RobotController::IsBrownedOut() {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
int RobotController::GetCommsDisableCount() {
|
||||
int32_t status = 0;
|
||||
int retVal = HAL_GetCommsDisableCount(&status);
|
||||
FRC_CheckErrorStatus(status, "GetCommsDisableCount");
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool RobotController::GetRSLState() {
|
||||
int32_t status = 0;
|
||||
bool retVal = HAL_GetRSLState(&status);
|
||||
@@ -214,6 +221,12 @@ int RobotController::GetFaultCount6V() {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void RobotController::ResetRailFaultCounts() {
|
||||
int32_t status = 0;
|
||||
HAL_ResetUserCurrentFaults(&status);
|
||||
FRC_CheckErrorStatus(status, "ResetRailFaultCounts");
|
||||
}
|
||||
|
||||
units::volt_t RobotController::GetBrownoutVoltage() {
|
||||
int32_t status = 0;
|
||||
double retVal = HAL_GetBrownoutVoltage(&status);
|
||||
|
||||
Reference in New Issue
Block a user