CTRE Phoenix C++ 5.33.1
ctre::phoenix::sensors::CANCoderFaults Struct Reference

Faults available to CANCoderFaults. More...

#include <ctre/phoenix/sensors/CANCoderFaults.h>

Public Member Functions

bool HasAnyFault () const
 
int ToBitfield () const
 
void Update (int bits)
 Updates current fault list with specified bit field of faults. More...
 
 CANCoderFaults (int bits)
 Updates current fault list with specified bit field of faults. More...
 
 CANCoderFaults ()
 

Public Attributes

bool HardwareFault
 Device detects hardware failure. More...
 
bool APIError
 API error detected. More...
 
bool UnderVoltage
 Device is under 6.5V. More...
 
bool ResetDuringEn
 Device was powered-on or reset while robot is enabled. More...
 
bool MagnetTooWeak
 Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet being used. More...
 

Detailed Description

Faults available to CANCoderFaults.

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.

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.

Constructor & Destructor Documentation

◆ CANCoderFaults() [1/2]

ctre::phoenix::sensors::CANCoderFaults::CANCoderFaults ( int  bits)
inline

Updates current fault list with specified bit field of faults.

Parameters
bitsbit field of faults to update with

◆ CANCoderFaults() [2/2]

ctre::phoenix::sensors::CANCoderFaults::CANCoderFaults ( )
inline

Member Function Documentation

◆ HasAnyFault()

bool ctre::phoenix::sensors::CANCoderFaults::HasAnyFault ( ) const
inline
Returns
true if any faults are tripped

◆ ToBitfield()

int ctre::phoenix::sensors::CANCoderFaults::ToBitfield ( ) const
inline
Returns
Current fault list as a bit field

◆ Update()

void ctre::phoenix::sensors::CANCoderFaults::Update ( int  bits)
inline

Updates current fault list with specified bit field of faults.

Parameters
bitsbit field of faults to update with

Member Data Documentation

◆ APIError

bool ctre::phoenix::sensors::CANCoderFaults::APIError

API error detected.

Make sure API and firmware versions are compatible.

◆ HardwareFault

bool ctre::phoenix::sensors::CANCoderFaults::HardwareFault

Device detects hardware failure.

◆ MagnetTooWeak

bool ctre::phoenix::sensors::CANCoderFaults::MagnetTooWeak

Magnet strength is too weak to provide reliable results Make sure CANCoder is close to the magnet being used.

◆ ResetDuringEn

bool ctre::phoenix::sensors::CANCoderFaults::ResetDuringEn

Device was powered-on or reset while robot is enabled.

Check your breakers and wiring.

◆ UnderVoltage

bool ctre::phoenix::sensors::CANCoderFaults::UnderVoltage

Device is under 6.5V.


The documentation for this struct was generated from the following file: