20 struct [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
21 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
22 "A migration guide is available at https:
50 return HardwareFault |
62 retval |= HardwareFault ? mask : 0; mask <<= 1;
63 retval |= APIError ? mask : 0; mask <<= 1;
64 retval |= UnderVoltage ? mask : 0; mask <<= 1;
65 retval |= ResetDuringEn ? mask : 0; mask <<= 1;
67 retval |= MagnetTooWeak ? mask : 0; mask <<= 1;
77 HardwareFault = (bits & mask) ?
true :
false; mask <<= 1;
78 APIError = (bits & mask) ?
true :
false; mask <<= 1;
79 UnderVoltage = (bits & mask) ?
true :
false; mask <<= 1;
80 ResetDuringEn = (bits & mask) ?
true :
false; mask <<= 1;
82 MagnetTooWeak = (bits & mask) ?
true :
false; mask <<= 1;
93 HardwareFault =
false;
96 ResetDuringEn =
false;
97 MagnetTooWeak =
false;
namespace ctre
Definition: paramEnum.h:5
Faults available to CANCoderFaults.
Definition: CANCoderFaults.h:23
bool HasAnyFault() const
Definition: CANCoderFaults.h:49
bool ResetDuringEn
Device was powered-on or reset while robot is enabled.
Definition: CANCoderFaults.h:40
bool HardwareFault
Device detects hardware failure.
Definition: CANCoderFaults.h:27
bool APIError
API error detected.
Definition: CANCoderFaults.h:31
bool UnderVoltage
Device is under 6.5V.
Definition: CANCoderFaults.h:35
void Update(int bits)
Updates current fault list with specified bit field of faults.
Definition: CANCoderFaults.h:75
bool MagnetTooWeak
Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet bei...
Definition: CANCoderFaults.h:45
CANCoderFaults(int bits)
Updates current fault list with specified bit field of faults.
Definition: CANCoderFaults.h:89
int ToBitfield() const
Definition: CANCoderFaults.h:59
CANCoderFaults()
Definition: CANCoderFaults.h:92