Package com.ctre.phoenix.sensors
Class CANCoderFaults
java.lang.Object
com.ctre.phoenix.sensors.CANCoderFaults
public class CANCoderFaults extends Object
Faults available to CANCoder (Currently has none)
-
Field Summary
Fields Modifier and Type Field Description boolean
APIError
API error detected.boolean
HardwareFault
Device detects hardware failureboolean
MagnetTooWeak
Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet being usedboolean
ResetDuringEn
Device was powered-on or reset while robot is enabled.boolean
UnderVoltage
Device is under 6.5V -
Constructor Summary
Constructors Constructor Description CANCoderFaults()
-
Method Summary
Modifier and Type Method Description boolean
hasAnyFault()
int
toBitfield()
void
update(int bits)
Updates current fault list with specified bit field of faults
-
Field Details
-
HardwareFault
Device detects hardware failure -
APIError
API error detected. Make sure API and firmware versions are compatible. -
UnderVoltage
Device is under 6.5V -
ResetDuringEn
Device was powered-on or reset while robot is enabled. Check your breakers and wiring. -
MagnetTooWeak
Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet being used
-
-
Constructor Details
-
CANCoderFaults
public CANCoderFaults()
-
-
Method Details
-
hasAnyFault
- Returns:
- true if any faults are tripped
-
toBitfield
- Returns:
- Current fault list as a bit field
-
update
Updates current fault list with specified bit field of faults- Parameters:
bits
- bit field of faults to update with
-