[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:
Ryan Blue
2024-08-11 02:25:02 -04:00
committed by GitHub
parent 59dc29e701
commit 19b478a33b
13 changed files with 124 additions and 9 deletions

View File

@@ -117,6 +117,16 @@ public final class RobotController {
return HAL.getBrownedOut();
}
/**
* Gets the number of times the system has been disabled due to communication errors with the
* Driver Station.
*
* @return number of disables due to communication errors.
*/
public static int getCommsDisableCount() {
return HAL.getCommsDisableCount();
}
/**
* Gets the current state of the Robot Signal Light (RSL).
*
@@ -191,7 +201,7 @@ public final class RobotController {
}
/**
* Get the count of the total current faults on the 3.3V rail since the controller has booted.
* Get the count of the total current faults on the 3.3V rail since the code started.
*
* @return The number of faults
*/
@@ -237,7 +247,7 @@ public final class RobotController {
}
/**
* Get the count of the total current faults on the 5V rail since the controller has booted.
* Get the count of the total current faults on the 5V rail since the code started.
*
* @return The number of faults
*/
@@ -283,7 +293,7 @@ public final class RobotController {
}
/**
* Get the count of the total current faults on the 6V rail since the controller has booted.
* Get the count of the total current faults on the 6V rail since the code started.
*
* @return The number of faults
*/
@@ -291,6 +301,11 @@ public final class RobotController {
return PowerJNI.getUserCurrentFaults6V();
}
/** Reset the overcurrent fault counters for all user rails to 0. */
public static void resetRailFaultCounts() {
PowerJNI.resetUserCurrentFaults();
}
/**
* Get the current brownout voltage setting.
*