mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user