Class Faults

java.lang.Object
com.ctre.phoenix.motorcontrol.Faults

public class Faults extends Object
All the faults available to motor controllers
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    API error detected.
    boolean
    Forward limit switch is tripped and device is trying to go forward Only trips when the device is limited
    boolean
    Sensor is beyond forward soft limit and device is trying to go forward Only trips when the device is limited
    boolean
    Not used, @see ResetDuringEn
    boolean
    Device detects hardware failure
    boolean
    Remote Sensor is no longer detected on bus
    boolean
    Device was powered-on or reset while robot is enabled.
    boolean
    Reverse limit switch is tripped and device is trying to go reverse Only trips when the device is limited
    boolean
    Sensor is beyond reverse soft limit and device is trying to go reverse Only trips when the device is limited
    boolean
    Device detects its sensor is out of phase
    boolean
    Device's sensor overflowed
    boolean
    Supply is well above the rated voltage of the hardware.
    boolean
    Supply is rapidly fluctuating and unstable.
    boolean
    Motor Controller is under 6.5V
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
     
    void
    update(int bits)
    Updates current fault list with specified bit field of faults

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • UnderVoltage

      public boolean UnderVoltage
      Motor Controller is under 6.5V
    • ForwardLimitSwitch

      public boolean ForwardLimitSwitch
      Forward limit switch is tripped and device is trying to go forward Only trips when the device is limited
    • ReverseLimitSwitch

      public boolean ReverseLimitSwitch
      Reverse limit switch is tripped and device is trying to go reverse Only trips when the device is limited
    • ForwardSoftLimit

      public boolean ForwardSoftLimit
      Sensor is beyond forward soft limit and device is trying to go forward Only trips when the device is limited
    • ReverseSoftLimit

      public boolean ReverseSoftLimit
      Sensor is beyond reverse soft limit and device is trying to go reverse Only trips when the device is limited
    • HardwareFailure

      public boolean HardwareFailure
      Device detects hardware failure
    • ResetDuringEn

      public boolean ResetDuringEn
      Device was powered-on or reset while robot is enabled. Check your breakers and wiring.
    • SensorOverflow

      public boolean SensorOverflow
      Device's sensor overflowed
    • SensorOutOfPhase

      public boolean SensorOutOfPhase
      Device detects its sensor is out of phase
    • HardwareESDReset

      public boolean HardwareESDReset
      Not used, @see ResetDuringEn
    • RemoteLossOfSignal

      public boolean RemoteLossOfSignal
      Remote Sensor is no longer detected on bus
    • APIError

      public boolean APIError
      API error detected. Make sure API and firmware versions are compatible.
    • SupplyOverV

      public boolean SupplyOverV
      Supply is well above the rated voltage of the hardware. This fault is specific to Brushless.
    • SupplyUnstable

      public boolean SupplyUnstable
      Supply is rapidly fluctuating and unstable. This fault is specific to Brushless.
  • Constructor Details

  • Method Details

    • hasAnyFault

      public boolean hasAnyFault()
      Returns:
      true if any faults are tripped
    • toBitfield

      public int toBitfield()
      Returns:
      Current fault list as a bit field
    • update

      public void update(int bits)
      Updates current fault list with specified bit field of faults
      Parameters:
      bits - bit field of faults to update with
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      string representation of current faults tripped