CANCoderFaults
- class phoenix5.sensors.CANCoderFaults(*args, **kwargs)
Bases:
pybind11_object
Faults available to CANCoderFaults
If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.
- Deprecated:
This device’s Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
Overloaded function.
__init__(self: phoenix5._ctre.sensors.CANCoderFaults, bits: int) -> None
Updates current fault list with specified bit field of faults
- Parameters:
bits – bit field of faults to update with
__init__(self: phoenix5._ctre.sensors.CANCoderFaults) -> None
- property APIError
API error detected. Make sure API and firmware versions are compatible.
- property HardwareFault
Device detects hardware failure
- property MagnetTooWeak
Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet being used
- property ResetDuringEn
Device was powered-on or reset while robot is enabled. Check your breakers and wiring.
- property UnderVoltage
Device is under 6.5V
- hasAnyFault() bool
- Returns:
true if any faults are tripped
- toBitfield() int
- Returns:
Current fault list as a bit field
- update(bits: int) None
Updates current fault list with specified bit field of faults
- Parameters:
bits – bit field of faults to update with