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

Choose what sensor source is used for differential control of a mechanism. More...

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

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

Public Member Functions

constexpr DifferentialSensorSourceValue (int value)
 
constexpr DifferentialSensorSourceValue ()
 
constexpr bool operator== (DifferentialSensorSourceValue data) const
 
constexpr bool operator== (int data) const
 
constexpr bool operator!= (DifferentialSensorSourceValue data) const
 
constexpr bool operator!= (int data) const
 
constexpr bool operator< (DifferentialSensorSourceValue 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 Disabled = 0
 Disable differential control.
 
static constexpr int RemoteTalonFX_Diff = 1
 Use another TalonFX on the same CAN bus.
 
static constexpr int RemotePigeon2_Yaw = 2
 Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
 
static constexpr int RemotePigeon2_Pitch = 3
 Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
 
static constexpr int RemotePigeon2_Roll = 4
 Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
 
static constexpr int RemoteCANcoder = 5
 Use another CANcoder on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
 

Friends

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ DifferentialSensorSourceValue() [1/2]

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

◆ DifferentialSensorSourceValue() [2/2]

ctre::phoenix6::signals::DifferentialSensorSourceValue::DifferentialSensorSourceValue ( )
inlineconstexpr

Member Function Documentation

◆ operator!=() [1/2]

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

◆ operator!=() [2/2]

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

◆ operator<() [1/2]

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

◆ operator<() [2/2]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ Serialize()

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

◆ ToString()

std::string ctre::phoenix6::signals::DifferentialSensorSourceValue::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,
DifferentialSensorSourceValue data )
friend

Member Data Documentation

◆ Disabled

int ctre::phoenix6::signals::DifferentialSensorSourceValue::Disabled = 0
staticconstexpr

Disable differential control.

◆ RemoteCANcoder

int ctre::phoenix6::signals::DifferentialSensorSourceValue::RemoteCANcoder = 5
staticconstexpr

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.

◆ RemotePigeon2_Pitch

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

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

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

◆ RemotePigeon2_Roll

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

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

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

◆ RemotePigeon2_Yaw

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

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

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

◆ RemoteTalonFX_Diff

int ctre::phoenix6::signals::DifferentialSensorSourceValue::RemoteTalonFX_Diff = 1
staticconstexpr

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.

◆ value

int ctre::phoenix6::signals::DifferentialSensorSourceValue::value

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