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
Sticky Faults for CANCoder (Currently has none)
Definition: CANCoderStickyFaults.h:23
bool ResetDuringEn
Device was powered-on or reset while robot is enabled.
Definition: CANCoderStickyFaults.h:40
bool APIError
API error detected.
Definition: CANCoderStickyFaults.h:31
void Update(int bits)
Updates current fault list with specified bit field of faults.
Definition: CANCoderStickyFaults.h:75
int ToBitfield() const
Definition: CANCoderStickyFaults.h:59
CANCoderStickyFaults()
Definition: CANCoderStickyFaults.h:92
bool HasAnyFault() const
Definition: CANCoderStickyFaults.h:49
bool HardwareFault
Device detects hardware failure.
Definition: CANCoderStickyFaults.h:27
CANCoderStickyFaults(int bits)
Updates current fault list with specified bit field of faults.
Definition: CANCoderStickyFaults.h:89
bool UnderVoltage
Device is under 6.5V.
Definition: CANCoderStickyFaults.h:35
bool MagnetTooWeak
Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet bei...
Definition: CANCoderStickyFaults.h:45