mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[hal, wpilib] Expose sticky hardware and firmware faults in PDH and PH (#6900)
This commit is contained in:
@@ -624,6 +624,8 @@ void HAL_GetREVPDHStickyFaults(HAL_REVPDHHandle handle,
|
||||
stickyFaults->brownout = status4.sticky_brownout_fault;
|
||||
stickyFaults->canWarning = status4.sticky_can_warning_fault;
|
||||
stickyFaults->canBusOff = status4.sticky_can_bus_off_fault;
|
||||
stickyFaults->hardwareFault = status4.sticky_hardware_fault;
|
||||
stickyFaults->firmwareFault = status4.sticky_firmware_fault;
|
||||
stickyFaults->hasReset = status4.sticky_has_reset_fault;
|
||||
}
|
||||
|
||||
|
||||
@@ -737,6 +737,8 @@ void HAL_GetREVPHStickyFaults(HAL_REVPHHandle handle,
|
||||
stickyFaults->brownout = status1.sticky_brownout_fault;
|
||||
stickyFaults->canWarning = status1.sticky_can_warning_fault;
|
||||
stickyFaults->canBusOff = status1.sticky_can_bus_off_fault;
|
||||
stickyFaults->hardwareFault = status1.sticky_hardware_fault;
|
||||
stickyFaults->firmwareFault = status1.sticky_firmware_fault;
|
||||
stickyFaults->hasReset = status1.sticky_has_reset_fault;
|
||||
}
|
||||
|
||||
|
||||
@@ -362,6 +362,10 @@ struct HAL_PowerDistributionStickyFaults {
|
||||
uint32_t canWarning : 1;
|
||||
/** The device's CAN controller experienced a "Bus Off" event. */
|
||||
uint32_t canBusOff : 1;
|
||||
/** The hardware on the device has malfunctioned. */
|
||||
uint32_t hardwareFault : 1;
|
||||
/** The firmware on the device has malfunctioned. */
|
||||
uint32_t firmwareFault : 1;
|
||||
/** The device has rebooted. */
|
||||
uint32_t hasReset : 1;
|
||||
};
|
||||
|
||||
@@ -122,6 +122,10 @@ struct HAL_REVPHStickyFaults {
|
||||
uint32_t canWarning : 1;
|
||||
/** The device's CAN controller experienced a "Bus Off" event. */
|
||||
uint32_t canBusOff : 1;
|
||||
/** The hardware on the device has malfunctioned. */
|
||||
uint32_t hardwareFault : 1;
|
||||
/** The firmware on the device has malfunctioned. */
|
||||
uint32_t firmwareFault : 1;
|
||||
/** The device has rebooted. */
|
||||
uint32_t hasReset : 1;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user