CTRE Phoenix 6 C++ 25.3.2
|
Choose what sensor source is reported via API and used by closed-loop and limit features. More...
#include <ctre/phoenix6/signals/SpnEnums.hpp>
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 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) |
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.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinevirtual |
Implements ctre::phoenix6::ISerializable.
|
inline |
Gets the string representation of this enum.
|
friend |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
staticconstexpr |
Use the internal rotor sensor in the Talon.
|
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.
|
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.
|
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.
int ctre::phoenix6::signals::FeedbackSensorSourceValue::value |