CTRE Phoenix 6 C++ 24.3.0
|
Choose what sensor source is used for differential control of a mechanism. More...
#include <ctre/phoenix6/signals/SpnEnums.hpp>
Public Member Functions | |
DifferentialSensorSourceValue (int value) | |
DifferentialSensorSourceValue () | |
std::string | ToString () const |
Gets the string representation of this enum. More... | |
std::string | Serialize () const |
bool | operator== (const DifferentialSensorSourceValue &data) const |
bool | operator== (int data) const |
bool | operator< (const DifferentialSensorSourceValue &data) const |
bool | operator< (int data) const |
virtual std::string | Serialize () const =0 |
Public Attributes | |
int | value |
Static Public Attributes | |
static constexpr int | Disabled = 0 |
static constexpr int | RemoteTalonFX_Diff = 1 |
static constexpr int | RemotePigeon2_Yaw = 2 |
static constexpr int | RemotePigeon2_Pitch = 3 |
static constexpr int | RemotePigeon2_Roll = 4 |
static constexpr int | RemoteCANcoder = 5 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const DifferentialSensorSourceValue &data) |
Choose what sensor source is used for differential control of a mechanism.
The default is Disabled. All other options require setting the DifferentialTalonFXSensorID, as the average of this Talon FX's sensor and the remote TalonFX's sensor is used for the differential controller's primary targets.
Choose RemoteTalonFX_Diff to use another TalonFX on the same CAN bus. Talon FX will update its differential position and velocity whenever the remote TalonFX publishes its information on CAN bus. The differential controller will use the difference between this TalonFX's sensor and the remote Talon FX's sensor for the differential component of the output.
Choose RemotePigeon2_Yaw, RemotePigeon2_Pitch, and RemotePigeon2_Roll to use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position to match the selected value whenever Pigeon2 publishes its information on CAN bus. Note that the Talon FX differential position will be in rotations and not degrees.
Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position and velocity to match the CANcoder whenever CANcoder publishes its information on CAN bus.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Implements ctre::phoenix6::ISerializable.
|
inline |
Gets the string representation of this enum.
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
int ctre::phoenix6::signals::DifferentialSensorSourceValue::value |