CTRE_Phoenix  5.19.4
ctre::phoenix::motorcontrol::Faults Struct Reference

#include <Faults.h>

Public Member Functions

bool HasAnyFault () const
 
int ToBitfield () const
 
 Faults (int bits)
 
std::string ToString ()
 

Public Attributes

bool UnderVoltage
 
bool ForwardLimitSwitch
 
bool ReverseLimitSwitch
 
bool ForwardSoftLimit
 
bool ReverseSoftLimit
 
bool HardwareFailure
 
bool ResetDuringEn
 
bool SensorOverflow
 
bool SensorOutOfPhase
 
bool HardwareESDReset
 
bool RemoteLossOfSignal
 
bool APIError
 
bool SupplyOverV
 
bool SupplyUnstable
 

Detailed Description

All the faults available to motor controllers

Constructor & Destructor Documentation

◆ Faults()

ctre::phoenix::motorcontrol::Faults::Faults ( int  bits)
inline

Creates fault list with specified bit field of faults

Parameters
bitsbit field of faults to update with

Member Function Documentation

◆ HasAnyFault()

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

◆ ToBitfield()

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

◆ ToString()

std::string ctre::phoenix::motorcontrol::Faults::ToString ( )
inline
Returns
string representation of current faults tripped

Member Data Documentation

◆ APIError

bool ctre::phoenix::motorcontrol::Faults::APIError

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

◆ ForwardLimitSwitch

bool ctre::phoenix::motorcontrol::Faults::ForwardLimitSwitch

Forward limit switch is tripped and device is trying to go forward Only trips when the device is limited

◆ ForwardSoftLimit

bool ctre::phoenix::motorcontrol::Faults::ForwardSoftLimit

Sensor is beyond forward soft limit and device is trying to go forward Only trips when the device is limited

◆ HardwareESDReset

bool ctre::phoenix::motorcontrol::Faults::HardwareESDReset

Not used,

See also
ResetDuringEn

◆ HardwareFailure

bool ctre::phoenix::motorcontrol::Faults::HardwareFailure

Device detects hardware failure

◆ RemoteLossOfSignal

bool ctre::phoenix::motorcontrol::Faults::RemoteLossOfSignal

Remote Sensor is no longer detected on bus

◆ ResetDuringEn

bool ctre::phoenix::motorcontrol::Faults::ResetDuringEn

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

◆ ReverseLimitSwitch

bool ctre::phoenix::motorcontrol::Faults::ReverseLimitSwitch

Reverse limit switch is tripped and device is trying to go reverse Only trips when the device is limited

◆ ReverseSoftLimit

bool ctre::phoenix::motorcontrol::Faults::ReverseSoftLimit

Sensor is beyond reverse soft limit and device is trying to go reverse Only trips when the device is limited

◆ SensorOutOfPhase

bool ctre::phoenix::motorcontrol::Faults::SensorOutOfPhase

Device detects its sensor is out of phase

◆ SensorOverflow

bool ctre::phoenix::motorcontrol::Faults::SensorOverflow

Device's sensor overflowed

◆ SupplyOverV

bool ctre::phoenix::motorcontrol::Faults::SupplyOverV

Supply is well above the rated voltage of the hardware. This fault is specific to Brushless.

◆ SupplyUnstable

bool ctre::phoenix::motorcontrol::Faults::SupplyUnstable

Supply is rapidly fluctuating and unstable. This fault is specific to Brushless.

◆ UnderVoltage

bool ctre::phoenix::motorcontrol::Faults::UnderVoltage

Motor Controller is under 6.5V


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