[wpilib] Add method to get breaker fault at a specific channel in PowerDistribution[Sticky]Faults (#5521)

Co-authored-by: Ryan Blue <ryanzblue@gmail.com>
This commit is contained in:
Asa Anderson
2023-12-23 12:14:13 -08:00
committed by GitHub
parent ef1cb3f41e
commit 1dba26c937
7 changed files with 353 additions and 0 deletions

View File

@@ -158,6 +158,15 @@ class PneumaticHub : public PneumaticsBase {
uint32_t Brownout : 1;
uint32_t CanWarning : 1;
uint32_t HardwareFault : 1;
/**
* Gets whether there is a fault at the specified channel.
* @param channel Channel to check for faults.
* @return True if a a fault exists at the channel, otherwise false.
* @throws A ChannelIndexOutOfRange error if the provided channel is outside
* of the range supported by the hardware.
*/
bool GetChannelFault(int channel) const;
};
/**