CTRE Phoenix Pro C++ 23.0.12
|
Choose what sensor source is reported via API and used by closed-loop and limit features. More...
#include <ctre/phoenixpro/signals/SpnEnums.hpp>
Public Member Functions | |
FeedbackSensorSourceValue (int value) | |
FeedbackSensorSourceValue () | |
std::string | ToString () const |
Gets the string representation of this enum. More... | |
std::string | Serialize () const |
bool | operator== (const FeedbackSensorSourceValue &data) const |
bool | operator== (int data) const |
bool | operator< (const FeedbackSensorSourceValue &data) const |
bool | operator< (int data) const |
virtual std::string | Serialize () const =0 |
Public Attributes | |
int | value |
Static Public Attributes | |
static constexpr int | RotorSensor = 0 |
static constexpr int | RemoteCANcoder = 1 |
static constexpr int | FusedCANcoder = 5 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const 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 FX. Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting FeedbackRemoteSensorID). Talon FX will update its position and velocity whenever CANcoder publishes its information on CAN bus. Choose FusedCANcoder and Talon FX will fuse another CANcoder's information with the internal rotor, which provides the best possible position and velocity for accuracy and bandwidth (note this requires setting FeedbackRemoteSensorID). FusedCANcoder was developed for applications such as swerve-azimuth.
Note: When the Talon Source is changed to FusedCANcoder, 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 CANcoder's Position signal.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Implements ctre::phoenixpro::ISerializable.
|
inline |
Gets the string representation of this enum.
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
int ctre::phoenixpro::signals::FeedbackSensorSourceValue::value |