mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal] Expose power rail disable and cpu temp functionality (#5477)
This commit is contained in:
@@ -32,6 +32,7 @@ void RoboRioData::ResetData() {
|
||||
userFaults5V.Reset(0);
|
||||
userFaults3V3.Reset(0);
|
||||
brownoutVoltage.Reset(6.75);
|
||||
cpuTemp.Reset(100);
|
||||
m_serialNumber = "";
|
||||
m_comments = "";
|
||||
}
|
||||
@@ -132,6 +133,7 @@ DEFINE_CAPI(int32_t, UserFaults6V, userFaults6V)
|
||||
DEFINE_CAPI(int32_t, UserFaults5V, userFaults5V)
|
||||
DEFINE_CAPI(int32_t, UserFaults3V3, userFaults3V3)
|
||||
DEFINE_CAPI(double, BrownoutVoltage, brownoutVoltage)
|
||||
DEFINE_CAPI(int32_t, CPUTemp, cpuTemp)
|
||||
|
||||
int32_t HALSIM_RegisterRoboRioSerialNumberCallback(
|
||||
HAL_RoboRioStringCallback callback, void* param, HAL_Bool initialNotify) {
|
||||
@@ -187,5 +189,6 @@ void HALSIM_RegisterRoboRioAllCallbacks(HAL_NotifyCallback callback,
|
||||
REGISTER(userFaults5V);
|
||||
REGISTER(userFaults3V3);
|
||||
REGISTER(brownoutVoltage);
|
||||
REGISTER(cpuTemp);
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user