CTRE_Phoenix 5.20.2
ctre::phoenix::sensors::CANCoderStickyFaults Struct Reference

#include <CANCoderStickyFaults.h>

Public Member Functions

bool HasAnyFault () const
 
int ToBitfield () const
 
void Update (int bits)
 
 CANCoderStickyFaults (int bits)
 

Public Attributes

bool HardwareFault
 
bool APIError
 
bool UnderVoltage
 
bool ResetDuringEn
 
bool MagnetTooWeak
 

Detailed Description

Sticky Faults for CANCoder (Currently has none)

Constructor & Destructor Documentation

◆ CANCoderStickyFaults()

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

Updates current fault list with specified bit field of faults

Parameters
bitsbit field of faults to update with

Member Function Documentation

◆ HasAnyFault()

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

◆ ToBitfield()

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

◆ Update()

void ctre::phoenix::sensors::CANCoderStickyFaults::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::CANCoderStickyFaults::APIError

API error detected. Make sure API and firmware versions are compatible.

◆ HardwareFault

bool ctre::phoenix::sensors::CANCoderStickyFaults::HardwareFault

Device detects hardware failure

◆ MagnetTooWeak

bool ctre::phoenix::sensors::CANCoderStickyFaults::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::CANCoderStickyFaults::ResetDuringEn

Device was powered-on or reset while robot is enabled. Check your breakers and wiring.

◆ UnderVoltage

bool ctre::phoenix::sensors::CANCoderStickyFaults::UnderVoltage

Device is under 6.5V


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