CTRE Phoenix 6 C++ 24.3.0
ctre::phoenix6::configs::DifferentialSensorsConfigs Class Reference

Configs related to sensors used for differential control of a mechanism. More...

#include <ctre/phoenix6/configs/Configs.hpp>

Inheritance diagram for ctre::phoenix6::configs::DifferentialSensorsConfigs:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

DifferentialSensorsConfigsWithDifferentialSensorSource (signals::DifferentialSensorSourceValue newDifferentialSensorSource)
 Modifies this configuration's DifferentialSensorSource parameter and returns itself for method-chaining and easier to use config API. More...
 
DifferentialSensorsConfigsWithDifferentialTalonFXSensorID (int newDifferentialTalonFXSensorID)
 Modifies this configuration's DifferentialTalonFXSensorID parameter and returns itself for method-chaining and easier to use config API. More...
 
DifferentialSensorsConfigsWithDifferentialRemoteSensorID (int newDifferentialRemoteSensorID)
 Modifies this configuration's DifferentialRemoteSensorID parameter and returns itself for method-chaining and easier to use config API. More...
 
std::string ToString () const override
 
std::string Serialize () const override
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize) override
 
virtual std::string ToString () const =0
 
virtual ctre::phoenix::StatusCode Deserialize (const std::string &string)=0
 
virtual std::string Serialize () const =0
 

Public Attributes

signals::DifferentialSensorSourceValue DifferentialSensorSource = signals::DifferentialSensorSourceValue::Disabled
 Choose what sensor source is used for differential control of a mechanism. More...
 
int DifferentialTalonFXSensorID = 0
 Device ID of which remote Talon FX to use. More...
 
int DifferentialRemoteSensorID = 0
 Device ID of which remote sensor to use on the differential axis. More...
 

Detailed Description

Configs related to sensors used for differential control of a mechanism.

Includes the differential sensor sources and IDs.

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::DifferentialSensorsConfigs::Deserialize ( const std::string &  to_deserialize)
inlineoverridevirtual

◆ Serialize()

std::string ctre::phoenix6::configs::DifferentialSensorsConfigs::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string ctre::phoenix6::configs::DifferentialSensorsConfigs::ToString ( ) const
inlineoverridevirtual

◆ WithDifferentialRemoteSensorID()

DifferentialSensorsConfigs & ctre::phoenix6::configs::DifferentialSensorsConfigs::WithDifferentialRemoteSensorID ( int  newDifferentialRemoteSensorID)
inline

Modifies this configuration's DifferentialRemoteSensorID parameter and returns itself for method-chaining and easier to use config API.

Device ID of which remote sensor to use on the differential axis. This is used when the Differential Sensor Source is not RemoteTalonFX_Diff.

  • Minimum Value: 0
  • Maximum Value: 62
  • Default Value: 0
  • Units:
Parameters
newDifferentialRemoteSensorIDParameter to modify
Returns
Itself

◆ WithDifferentialSensorSource()

DifferentialSensorsConfigs & ctre::phoenix6::configs::DifferentialSensorsConfigs::WithDifferentialSensorSource ( signals::DifferentialSensorSourceValue  newDifferentialSensorSource)
inline

Modifies this configuration's DifferentialSensorSource parameter and returns itself for method-chaining and easier to use config API.

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.

Parameters
newDifferentialSensorSourceParameter to modify
Returns
Itself

◆ WithDifferentialTalonFXSensorID()

DifferentialSensorsConfigs & ctre::phoenix6::configs::DifferentialSensorsConfigs::WithDifferentialTalonFXSensorID ( int  newDifferentialTalonFXSensorID)
inline

Modifies this configuration's DifferentialTalonFXSensorID parameter and returns itself for method-chaining and easier to use config API.

Device ID of which remote Talon FX to use. This is used when the Differential Sensor Source is not disabled.

  • Minimum Value: 0
  • Maximum Value: 62
  • Default Value: 0
  • Units:
Parameters
newDifferentialTalonFXSensorIDParameter to modify
Returns
Itself

Member Data Documentation

◆ DifferentialRemoteSensorID

int ctre::phoenix6::configs::DifferentialSensorsConfigs::DifferentialRemoteSensorID = 0

Device ID of which remote sensor to use on the differential axis.

This is used when the Differential Sensor Source is not RemoteTalonFX_Diff.

  • Minimum Value: 0
  • Maximum Value: 62
  • Default Value: 0
  • Units:

◆ DifferentialSensorSource

signals::DifferentialSensorSourceValue ctre::phoenix6::configs::DifferentialSensorsConfigs::DifferentialSensorSource = signals::DifferentialSensorSourceValue::Disabled

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.

◆ DifferentialTalonFXSensorID

int ctre::phoenix6::configs::DifferentialSensorsConfigs::DifferentialTalonFXSensorID = 0

Device ID of which remote Talon FX to use.

This is used when the Differential Sensor Source is not disabled.

  • Minimum Value: 0
  • Maximum Value: 62
  • Default Value: 0
  • Units:

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