Class PowerDistributionFaults

java.lang.Object
edu.wpi.first.hal.PowerDistributionFaults

public class PowerDistributionFaults extends Object
Faults for a PowerDistribution device. These faults are only active while the condition is active.
  • Field Details

  • Constructor Details

    • PowerDistributionFaults

      public PowerDistributionFaults(int faults)
      Constructs from a bitfield.
      Parameters:
      faults - faults
  • Method Details

    • getBreakerFault

      public final boolean getBreakerFault(int channel)
      Gets whether there is a breaker fault at the specified channel.
      Parameters:
      channel - Channel to check for faults.
      Returns:
      True if there is a breaker fault at the channel, otherwise false.
      Throws:
      IndexOutOfBoundsException - if the provided channel is outside of the range supported by the hardware.