diff --git a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java index 44271897fea..e3c423d3638 100644 --- a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java +++ b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java @@ -6,58 +6,85 @@ @SuppressWarnings("MemberName") public class PowerDistributionFaults { + /** Breaker fault on channel 0 */ public final boolean Channel0BreakerFault; + /** Breaker fault on channel 1 */ public final boolean Channel1BreakerFault; + /** Breaker fault on channel 2 */ public final boolean Channel2BreakerFault; + /** Breaker fault on channel 3 */ public final boolean Channel3BreakerFault; + /** Breaker fault on channel 4 */ public final boolean Channel4BreakerFault; + /** Breaker fault on channel 5 */ public final boolean Channel5BreakerFault; + /** Breaker fault on channel 6 */ public final boolean Channel6BreakerFault; + /** Breaker fault on channel 7 */ public final boolean Channel7BreakerFault; + /** Breaker fault on channel 8 */ public final boolean Channel8BreakerFault; + /** Breaker fault on channel 9 */ public final boolean Channel9BreakerFault; + /** Breaker fault on channel 10 */ public final boolean Channel10BreakerFault; + /** Breaker fault on channel 11 */ public final boolean Channel11BreakerFault; + /** Breaker fault on channel 12 */ public final boolean Channel12BreakerFault; + /** Breaker fault on channel 13 */ public final boolean Channel13BreakerFault; + /** Breaker fault on channel 14 */ public final boolean Channel14BreakerFault; + /** Breaker fault on channel 15 */ public final boolean Channel15BreakerFault; + /** Breaker fault on channel 16 */ public final boolean Channel16BreakerFault; + /** Breaker fault on channel 17 */ public final boolean Channel17BreakerFault; + /** Breaker fault on channel 18 */ public final boolean Channel18BreakerFault; + /** Breaker fault on channel 19 */ public final boolean Channel19BreakerFault; + /** Breaker fault on channel 20 */ public final boolean Channel20BreakerFault; + /** Breaker fault on channel 21 */ public final boolean Channel21BreakerFault; + /** Breaker fault on channel 22 */ public final boolean Channel22BreakerFault; + /** Breaker fault on channel 23 */ public final boolean Channel23BreakerFault; + /** The input voltage is below the minimum voltage */ public final boolean Brownout; + /** A warning was raised by the device's CAN controller */ public final boolean CanWarning; + /** The hardware on the device has malfunctioned */ public final boolean HardwareFault; /** diff --git a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java index 91e3473ef16..0e597782ef8 100644 --- a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java +++ b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java @@ -6,60 +6,88 @@ @SuppressWarnings("MemberName") public class PowerDistributionStickyFaults { + /** Breaker fault on channel 0 */ public final boolean Channel0BreakerFault; + /** Breaker fault on channel 1 */ public final boolean Channel1BreakerFault; + /** Breaker fault on channel 2 */ public final boolean Channel2BreakerFault; + /** Breaker fault on channel 3 */ public final boolean Channel3BreakerFault; + /** Breaker fault on channel 4 */ public final boolean Channel4BreakerFault; + /** Breaker fault on channel 5 */ public final boolean Channel5BreakerFault; + /** Breaker fault on channel 6 */ public final boolean Channel6BreakerFault; + /** Breaker fault on channel 7 */ public final boolean Channel7BreakerFault; + /** Breaker fault on channel 8 */ public final boolean Channel8BreakerFault; + /** Breaker fault on channel 9 */ public final boolean Channel9BreakerFault; + /** Breaker fault on channel 10 */ public final boolean Channel10BreakerFault; + /** Breaker fault on channel 11 */ public final boolean Channel11BreakerFault; + /** Breaker fault on channel 12 */ public final boolean Channel12BreakerFault; + /** Breaker fault on channel 13 */ public final boolean Channel13BreakerFault; + /** Breaker fault on channel 14 */ public final boolean Channel14BreakerFault; + /** Breaker fault on channel 15 */ public final boolean Channel15BreakerFault; + /** Breaker fault on channel 16 */ public final boolean Channel16BreakerFault; + /** Breaker fault on channel 17 */ public final boolean Channel17BreakerFault; + /** Breaker fault on channel 18 */ public final boolean Channel18BreakerFault; + /** Breaker fault on channel 19 */ public final boolean Channel19BreakerFault; + /** Breaker fault on channel 20 */ public final boolean Channel20BreakerFault; + /** Breaker fault on channel 21 */ public final boolean Channel21BreakerFault; + /** Breaker fault on channel 22 */ public final boolean Channel22BreakerFault; + /** Breaker fault on channel 23 */ public final boolean Channel23BreakerFault; + /** The input voltage was below the minimum voltage */ public final boolean Brownout; + /** A warning was raised by the device's CAN controller */ public final boolean CanWarning; + /** The device's CAN controller experienced a "Bus Off" event */ public final boolean CanBusOff; + /** The device has reset since the last time sticky faults were cleared */ public final boolean HasReset; /** diff --git a/hal/src/main/native/include/hal/PowerDistribution.h b/hal/src/main/native/include/hal/PowerDistribution.h index 835f2eaf4cf..5b277b15236 100644 --- a/hal/src/main/native/include/hal/PowerDistribution.h +++ b/hal/src/main/native/include/hal/PowerDistribution.h @@ -244,32 +244,59 @@ struct HAL_PowerDistributionVersion { }; struct HAL_PowerDistributionFaults { + /** Breaker fault on channel 0 */ uint32_t channel0BreakerFault : 1; + /** Breaker fault on channel 1 */ uint32_t channel1BreakerFault : 1; + /** Breaker fault on channel 2 */ uint32_t channel2BreakerFault : 1; + /** Breaker fault on channel 3 */ uint32_t channel3BreakerFault : 1; + /** Breaker fault on channel 4 */ uint32_t channel4BreakerFault : 1; + /** Breaker fault on channel 5 */ uint32_t channel5BreakerFault : 1; + /** Breaker fault on channel 6 */ uint32_t channel6BreakerFault : 1; + /** Breaker fault on channel 7 */ uint32_t channel7BreakerFault : 1; + /** Breaker fault on channel 8 */ uint32_t channel8BreakerFault : 1; + /** Breaker fault on channel 9 */ uint32_t channel9BreakerFault : 1; + /** Breaker fault on channel 10 */ uint32_t channel10BreakerFault : 1; + /** Breaker fault on channel 12 */ uint32_t channel11BreakerFault : 1; + /** Breaker fault on channel 13 */ uint32_t channel12BreakerFault : 1; + /** Breaker fault on channel 14 */ uint32_t channel13BreakerFault : 1; + /** Breaker fault on channel 15 */ uint32_t channel14BreakerFault : 1; + /** Breaker fault on channel 16 */ uint32_t channel15BreakerFault : 1; + /** Breaker fault on channel 17 */ uint32_t channel16BreakerFault : 1; + /** Breaker fault on channel 18 */ uint32_t channel17BreakerFault : 1; + /** Breaker fault on channel 19 */ uint32_t channel18BreakerFault : 1; + /** Breaker fault on channel 20 */ uint32_t channel19BreakerFault : 1; + /** Breaker fault on channel 21 */ uint32_t channel20BreakerFault : 1; + /** Breaker fault on channel 22 */ uint32_t channel21BreakerFault : 1; + /** Breaker fault on channel 23 */ uint32_t channel22BreakerFault : 1; + /** Breaker fault on channel 24 */ uint32_t channel23BreakerFault : 1; + /** The input voltage is below the minimum voltage */ uint32_t brownout : 1; + /** A warning was raised by the device's CAN controller */ uint32_t canWarning : 1; + /** The hardware on the device has malfunctioned */ uint32_t hardwareFault : 1; }; @@ -277,33 +304,61 @@ struct HAL_PowerDistributionFaults { * Storage for REV PDH Sticky Faults */ struct HAL_PowerDistributionStickyFaults { + /** Breaker fault on channel 0 */ uint32_t channel0BreakerFault : 1; + /** Breaker fault on channel 1 */ uint32_t channel1BreakerFault : 1; + /** Breaker fault on channel 2 */ uint32_t channel2BreakerFault : 1; + /** Breaker fault on channel 3 */ uint32_t channel3BreakerFault : 1; + /** Breaker fault on channel 4 */ uint32_t channel4BreakerFault : 1; + /** Breaker fault on channel 5 */ uint32_t channel5BreakerFault : 1; + /** Breaker fault on channel 6 */ uint32_t channel6BreakerFault : 1; + /** Breaker fault on channel 7 */ uint32_t channel7BreakerFault : 1; + /** Breaker fault on channel 8 */ uint32_t channel8BreakerFault : 1; + /** Breaker fault on channel 9 */ uint32_t channel9BreakerFault : 1; + /** Breaker fault on channel 10 */ uint32_t channel10BreakerFault : 1; + /** Breaker fault on channel 12 */ uint32_t channel11BreakerFault : 1; + /** Breaker fault on channel 13 */ uint32_t channel12BreakerFault : 1; + /** Breaker fault on channel 14 */ uint32_t channel13BreakerFault : 1; + /** Breaker fault on channel 15 */ uint32_t channel14BreakerFault : 1; + /** Breaker fault on channel 16 */ uint32_t channel15BreakerFault : 1; + /** Breaker fault on channel 17 */ uint32_t channel16BreakerFault : 1; + /** Breaker fault on channel 18 */ uint32_t channel17BreakerFault : 1; + /** Breaker fault on channel 19 */ uint32_t channel18BreakerFault : 1; + /** Breaker fault on channel 20 */ uint32_t channel19BreakerFault : 1; + /** Breaker fault on channel 21 */ uint32_t channel20BreakerFault : 1; + /** Breaker fault on channel 22 */ uint32_t channel21BreakerFault : 1; + /** Breaker fault on channel 23 */ uint32_t channel22BreakerFault : 1; + /** Breaker fault on channel 24 */ uint32_t channel23BreakerFault : 1; + /** The input voltage is below the minimum voltage */ uint32_t brownout : 1; + /** A warning was raised by the device's CAN controller */ uint32_t canWarning : 1; + /** The device's CAN controller experienced a "Bus Off" event */ uint32_t canBusOff : 1; + /** The device has reset since the last time sticky faults were cleared */ uint32_t hasReset : 1; }; diff --git a/wpilibc/src/main/native/include/frc/PowerDistribution.h b/wpilibc/src/main/native/include/frc/PowerDistribution.h index 0b79b2c954b..509f9b7fa8b 100644 --- a/wpilibc/src/main/native/include/frc/PowerDistribution.h +++ b/wpilibc/src/main/native/include/frc/PowerDistribution.h @@ -167,32 +167,59 @@ class PowerDistribution : public wpi::Sendable, Version GetVersion() const; struct Faults { + /** Breaker fault on channel 0 */ uint32_t Channel0BreakerFault : 1; + /** Breaker fault on channel 1 */ uint32_t Channel1BreakerFault : 1; + /** Breaker fault on channel 2 */ uint32_t Channel2BreakerFault : 1; + /** Breaker fault on channel 3 */ uint32_t Channel3BreakerFault : 1; + /** Breaker fault on channel 4 */ uint32_t Channel4BreakerFault : 1; + /** Breaker fault on channel 5 */ uint32_t Channel5BreakerFault : 1; + /** Breaker fault on channel 6 */ uint32_t Channel6BreakerFault : 1; + /** Breaker fault on channel 7 */ uint32_t Channel7BreakerFault : 1; + /** Breaker fault on channel 8 */ uint32_t Channel8BreakerFault : 1; + /** Breaker fault on channel 9 */ uint32_t Channel9BreakerFault : 1; + /** Breaker fault on channel 10 */ uint32_t Channel10BreakerFault : 1; + /** Breaker fault on channel 12 */ uint32_t Channel11BreakerFault : 1; + /** Breaker fault on channel 13 */ uint32_t Channel12BreakerFault : 1; + /** Breaker fault on channel 14 */ uint32_t Channel13BreakerFault : 1; + /** Breaker fault on channel 15 */ uint32_t Channel14BreakerFault : 1; + /** Breaker fault on channel 16 */ uint32_t Channel15BreakerFault : 1; + /** Breaker fault on channel 17 */ uint32_t Channel16BreakerFault : 1; + /** Breaker fault on channel 18 */ uint32_t Channel17BreakerFault : 1; + /** Breaker fault on channel 19 */ uint32_t Channel18BreakerFault : 1; + /** Breaker fault on channel 20 */ uint32_t Channel19BreakerFault : 1; + /** Breaker fault on channel 21 */ uint32_t Channel20BreakerFault : 1; + /** Breaker fault on channel 22 */ uint32_t Channel21BreakerFault : 1; + /** Breaker fault on channel 23 */ uint32_t Channel22BreakerFault : 1; + /** Breaker fault on channel 24 */ uint32_t Channel23BreakerFault : 1; + /** The input voltage is below the minimum voltage */ uint32_t Brownout : 1; + /** A warning was raised by the device's CAN controller */ uint32_t CanWarning : 1; + /** The hardware on the device has malfunctioned */ uint32_t HardwareFault : 1; /** @@ -213,33 +240,61 @@ class PowerDistribution : public wpi::Sendable, Faults GetFaults() const; struct StickyFaults { + /** Breaker fault on channel 0 */ uint32_t Channel0BreakerFault : 1; + /** Breaker fault on channel 1 */ uint32_t Channel1BreakerFault : 1; + /** Breaker fault on channel 2 */ uint32_t Channel2BreakerFault : 1; + /** Breaker fault on channel 3 */ uint32_t Channel3BreakerFault : 1; + /** Breaker fault on channel 4 */ uint32_t Channel4BreakerFault : 1; + /** Breaker fault on channel 5 */ uint32_t Channel5BreakerFault : 1; + /** Breaker fault on channel 6 */ uint32_t Channel6BreakerFault : 1; + /** Breaker fault on channel 7 */ uint32_t Channel7BreakerFault : 1; + /** Breaker fault on channel 8 */ uint32_t Channel8BreakerFault : 1; + /** Breaker fault on channel 9 */ uint32_t Channel9BreakerFault : 1; + /** Breaker fault on channel 10 */ uint32_t Channel10BreakerFault : 1; + /** Breaker fault on channel 12 */ uint32_t Channel11BreakerFault : 1; + /** Breaker fault on channel 13 */ uint32_t Channel12BreakerFault : 1; + /** Breaker fault on channel 14 */ uint32_t Channel13BreakerFault : 1; + /** Breaker fault on channel 15 */ uint32_t Channel14BreakerFault : 1; + /** Breaker fault on channel 16 */ uint32_t Channel15BreakerFault : 1; + /** Breaker fault on channel 17 */ uint32_t Channel16BreakerFault : 1; + /** Breaker fault on channel 18 */ uint32_t Channel17BreakerFault : 1; + /** Breaker fault on channel 19 */ uint32_t Channel18BreakerFault : 1; + /** Breaker fault on channel 20 */ uint32_t Channel19BreakerFault : 1; + /** Breaker fault on channel 21 */ uint32_t Channel20BreakerFault : 1; + /** Breaker fault on channel 22 */ uint32_t Channel21BreakerFault : 1; + /** Breaker fault on channel 23 */ uint32_t Channel22BreakerFault : 1; + /** Breaker fault on channel 24 */ uint32_t Channel23BreakerFault : 1; + /** The input voltage is below the minimum voltage */ uint32_t Brownout : 1; + /** A warning was raised by the device's CAN controller */ uint32_t CanWarning : 1; + /** The device's CAN controller experienced a "Bus Off" event */ uint32_t CanBusOff : 1; + /** The device has reset since the last time sticky faults were cleared */ uint32_t HasReset : 1; /**