CTRE Phoenix 6 C++ 25.3.2
Loading...
Searching...
No Matches
ctre::phoenix6::signals::FeedbackSensorSourceValue Class Reference

Choose what sensor source is reported via API and used by closed-loop and limit features. More...

#include <ctre/phoenix6/signals/SpnEnums.hpp>

Inheritance diagram for ctre::phoenix6::signals::FeedbackSensorSourceValue:
ctre::phoenix6::ISerializable

Public Member Functions

constexpr FeedbackSensorSourceValue (int value)
 
constexpr FeedbackSensorSourceValue ()
 
constexpr bool operator== (FeedbackSensorSourceValue data) const
 
constexpr bool operator== (int data) const
 
constexpr bool operator!= (FeedbackSensorSourceValue data) const
 
constexpr bool operator!= (int data) const
 
constexpr bool operator< (FeedbackSensorSourceValue data) const
 
constexpr bool operator< (int data) const
 
std::string ToString () const
 Gets the string representation of this enum.
 
std::string Serialize () const
 
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

int value
 

Static Public Attributes

static constexpr int RotorSensor = 0
 Use the internal rotor sensor in the Talon.
 
static constexpr int RemoteCANcoder = 1
 Use another CANcoder on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int RemotePigeon2_Yaw = 2
 Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int RemotePigeon2_Pitch = 3
 Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int RemotePigeon2_Roll = 4
 Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int FusedCANcoder = 5
 Requires Phoenix Pro; Talon will fuse another CANcoder's information with the internal rotor, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int SyncCANcoder = 6
 Requires Phoenix Pro; Talon will synchronize its internal rotor position against another CANcoder, then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int RemoteCANdiPWM1 = 9
 Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANdi™.
 
static constexpr int RemoteCANdiPWM2 = 10
 Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANdi™.
 
static constexpr int RemoteCANdiQuadrature = 11
 Use a quadrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™.
 
static constexpr int FusedCANdiPWM1 = 12
 Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANdi™, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int FusedCANdiPWM2 = 13
 Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANdi™, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int FusedCANdiQuadrature = 14
 Requires Phoenix Pro; Talon will fuse a qaudrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™.
 
static constexpr int SyncCANdiPWM1 = 15
 Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width encoder attached to Sensor Input 1 (S1IN), then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID).
 
static constexpr int SyncCANdiPWM2 = 16
 Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width encoder attached to Sensor Input 1 (S1IN), then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID).
 

Friends

std::ostream & operator<< (std::ostream &os, FeedbackSensorSourceValue data)
 

Detailed Description

Choose what sensor source is reported via API and used by closed-loop and limit features.

The default is RotorSensor, which uses the internal rotor sensor in the Talon.

Choose Remote* to use another sensor on the same CAN bus (this also requires setting FeedbackRemoteSensorID). Talon will update its position and velocity whenever the remote sensor publishes its information on CAN bus, and the Talon internal rotor will not be used.

Choose Fused* (requires Phoenix Pro) and Talon will fuse another sensor's information with the internal rotor, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID). This was developed for applications such as swerve-azimuth.

Choose Sync* (requires Phoenix Pro) and Talon will synchronize its internal rotor position against another sensor, then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID). The Talon will report if its internal position differs significantly from the reported remote sensor position. This was developed for mechanisms where there is a risk of the sensor failing in such a way that it reports a position that does not match the mechanism, such as the sensor mounting assembly breaking off.

Choose RemotePigeon2_Yaw, RemotePigeon2_Pitch, and RemotePigeon2_Roll to use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID). Talon will update its position to match the selected value whenever Pigeon2 publishes its information on CAN bus. Note that the Talon position will be in rotations and not degrees.

Note: When the feedback source is changed to Fused* or Sync*, the Talon needs a period of time to fuse before sensor-based (soft-limit, closed loop, etc.) features are used. This period of time is determined by the update frequency of the remote sensor's Position signal.

Constructor & Destructor Documentation

◆ FeedbackSensorSourceValue() [1/2]

ctre::phoenix6::signals::FeedbackSensorSourceValue::FeedbackSensorSourceValue ( int value)
inlineconstexpr

◆ FeedbackSensorSourceValue() [2/2]

ctre::phoenix6::signals::FeedbackSensorSourceValue::FeedbackSensorSourceValue ( )
inlineconstexpr

Member Function Documentation

◆ operator!=() [1/2]

bool ctre::phoenix6::signals::FeedbackSensorSourceValue::operator!= ( FeedbackSensorSourceValue data) const
inlineconstexpr

◆ operator!=() [2/2]

bool ctre::phoenix6::signals::FeedbackSensorSourceValue::operator!= ( int data) const
inlineconstexpr

◆ operator<() [1/2]

bool ctre::phoenix6::signals::FeedbackSensorSourceValue::operator< ( FeedbackSensorSourceValue data) const
inlineconstexpr

◆ operator<() [2/2]

bool ctre::phoenix6::signals::FeedbackSensorSourceValue::operator< ( int data) const
inlineconstexpr

◆ operator==() [1/2]

bool ctre::phoenix6::signals::FeedbackSensorSourceValue::operator== ( FeedbackSensorSourceValue data) const
inlineconstexpr

◆ operator==() [2/2]

bool ctre::phoenix6::signals::FeedbackSensorSourceValue::operator== ( int data) const
inlineconstexpr

◆ Serialize()

std::string ctre::phoenix6::signals::FeedbackSensorSourceValue::Serialize ( ) const
inlinevirtual

◆ ToString()

std::string ctre::phoenix6::signals::FeedbackSensorSourceValue::ToString ( ) const
inline

Gets the string representation of this enum.

Returns
String representation of this enum

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
FeedbackSensorSourceValue data )
friend

Member Data Documentation

◆ FusedCANcoder

int ctre::phoenix6::signals::FeedbackSensorSourceValue::FusedCANcoder = 5
staticconstexpr

Requires Phoenix Pro; Talon will fuse another CANcoder's information with the internal rotor, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID).

FusedCANcoder was developed for applications such as swerve-azimuth.

◆ FusedCANdiPWM1

int ctre::phoenix6::signals::FeedbackSensorSourceValue::FusedCANdiPWM1 = 12
staticconstexpr

Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANdi™, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID).

FusedCANdi was developed for applications such as swerve-azimuth.

◆ FusedCANdiPWM2

int ctre::phoenix6::signals::FeedbackSensorSourceValue::FusedCANdiPWM2 = 13
staticconstexpr

Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANdi™, which provides the best possible position and velocity for accuracy and bandwidth (this also requires setting FeedbackRemoteSensorID).

FusedCANdi was developed for applications such as swerve-azimuth.

◆ FusedCANdiQuadrature

int ctre::phoenix6::signals::FeedbackSensorSourceValue::FusedCANdiQuadrature = 14
staticconstexpr

Requires Phoenix Pro; Talon will fuse a qaudrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™.

This provides velocity and relative position measurements. This also requires setting FeedbackRemoteSensorID.

◆ RemoteCANcoder

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemoteCANcoder = 1
staticconstexpr

Use another CANcoder on the same CAN bus (this also requires setting FeedbackRemoteSensorID).

Talon will update its position and velocity whenever CANcoder publishes its information on CAN bus, and the Talon internal rotor will not be used.

◆ RemoteCANdiPWM1

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemoteCANdiPWM1 = 9
staticconstexpr

Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANdi™.

Talon will update its position and velocity whenever the CTR Electronics' CANdi™ publishes its information on CAN bus, and the Talon internal rotor will not be used.

◆ RemoteCANdiPWM2

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemoteCANdiPWM2 = 10
staticconstexpr

Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANdi™.

Talon will update its position and velocity whenever the CTR Electronics' CANdi™ publishes its information on CAN bus, and the Talon internal rotor will not be used.

◆ RemoteCANdiQuadrature

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemoteCANdiQuadrature = 11
staticconstexpr

Use a quadrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™.

Talon will update its position and velocity whenever the CTR Electronics' CANdi™ publishes its information on CAN bus, and the Talon internal rotor will not be used.

◆ RemotePigeon2_Pitch

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemotePigeon2_Pitch = 3
staticconstexpr

Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).

Talon will update its position to match the Pigeon2 pitch whenever Pigeon2 publishes its information on CAN bus. Note that the Talon position will be in rotations and not degrees.

◆ RemotePigeon2_Roll

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemotePigeon2_Roll = 4
staticconstexpr

Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).

Talon will update its position to match the Pigeon2 roll whenever Pigeon2 publishes its information on CAN bus. Note that the Talon position will be in rotations and not degrees.

◆ RemotePigeon2_Yaw

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RemotePigeon2_Yaw = 2
staticconstexpr

Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).

Talon will update its position to match the Pigeon2 yaw whenever Pigeon2 publishes its information on CAN bus. Note that the Talon position will be in rotations and not degrees.

◆ RotorSensor

int ctre::phoenix6::signals::FeedbackSensorSourceValue::RotorSensor = 0
staticconstexpr

Use the internal rotor sensor in the Talon.

◆ SyncCANcoder

int ctre::phoenix6::signals::FeedbackSensorSourceValue::SyncCANcoder = 6
staticconstexpr

Requires Phoenix Pro; Talon will synchronize its internal rotor position against another CANcoder, then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID).

The Talon will report if its internal position differs significantly from the reported CANcoder position. SyncCANcoder was developed for mechanisms where there is a risk of the CANcoder failing in such a way that it reports a position that does not match the mechanism, such as the sensor mounting assembly breaking off.

◆ SyncCANdiPWM1

int ctre::phoenix6::signals::FeedbackSensorSourceValue::SyncCANdiPWM1 = 15
staticconstexpr

Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width encoder attached to Sensor Input 1 (S1IN), then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID).

The Talon will report if its internal position differs significantly from the reported PWM position. SyncCANdi was developed for mechanisms where there is a risk of the CTR Electronics' CANdi™ failing in such a way that it reports a position that does not match the mechanism, such as the sensor mounting assembly breaking off.

◆ SyncCANdiPWM2

int ctre::phoenix6::signals::FeedbackSensorSourceValue::SyncCANdiPWM2 = 16
staticconstexpr

Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width encoder attached to Sensor Input 1 (S1IN), then continue to use the rotor sensor for closed loop control (this also requires setting FeedbackRemoteSensorID).

The Talon will report if its internal position differs significantly from the reported PWM position. SyncCANdi was developed for mechanisms where there is a risk of the CTR Electronics' CANdi™ failing in such a way that it reports a position that does not match the mechanism, such as the sensor mounting assembly breaking off.

◆ value

int ctre::phoenix6::signals::FeedbackSensorSourceValue::value

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