CTRE Phoenix 6 C++ 25.3.0
|
Class description for the Talon FXS motor controller. More...
#include <ctre/phoenix6/core/CoreTalonFXS.hpp>
Public Member Functions | |
constexpr | TalonFXSConfiguration ()=default |
constexpr TalonFXSConfiguration & | WithMotorOutput (MotorOutputConfigs newMotorOutput) |
Modifies this configuration's MotorOutput parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithCurrentLimits (CurrentLimitsConfigs newCurrentLimits) |
Modifies this configuration's CurrentLimits parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithVoltage (VoltageConfigs newVoltage) |
Modifies this configuration's Voltage parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithExternalFeedback (ExternalFeedbackConfigs newExternalFeedback) |
Modifies this configuration's ExternalFeedback parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithDifferentialSensors (DifferentialSensorsConfigs newDifferentialSensors) |
Modifies this configuration's DifferentialSensors parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithDifferentialConstants (DifferentialConstantsConfigs newDifferentialConstants) |
Modifies this configuration's DifferentialConstants parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithOpenLoopRamps (OpenLoopRampsConfigs newOpenLoopRamps) |
Modifies this configuration's OpenLoopRamps parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithClosedLoopRamps (ClosedLoopRampsConfigs newClosedLoopRamps) |
Modifies this configuration's ClosedLoopRamps parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithHardwareLimitSwitch (HardwareLimitSwitchConfigs newHardwareLimitSwitch) |
Modifies this configuration's HardwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithAudio (AudioConfigs newAudio) |
Modifies this configuration's Audio parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithSoftwareLimitSwitch (SoftwareLimitSwitchConfigs newSoftwareLimitSwitch) |
Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithMotionMagic (MotionMagicConfigs newMotionMagic) |
Modifies this configuration's MotionMagic parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithCustomParams (CustomParamsConfigs newCustomParams) |
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithClosedLoopGeneral (ClosedLoopGeneralConfigs newClosedLoopGeneral) |
Modifies this configuration's ClosedLoopGeneral parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithCommutation (CommutationConfigs newCommutation) |
Modifies this configuration's Commutation parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithSlot0 (Slot0Configs newSlot0) |
Modifies this configuration's Slot0 parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithSlot1 (Slot1Configs newSlot1) |
Modifies this configuration's Slot1 parameter and returns itself for method-chaining and easier to use config API. | |
constexpr TalonFXSConfiguration & | WithSlot2 (Slot2Configs newSlot2) |
Modifies this configuration's Slot2 parameter and returns itself for method-chaining and easier to use config API. | |
std::string | ToString () const |
Get the string representation of this configuration. | |
std::string | Serialize () const |
Get the serialized form of this configuration. | |
ctre::phoenix::StatusCode | Deserialize (const std::string &to_deserialize) |
Take a string and deserialize it to this configuration. | |
![]() | |
![]() |
Public Attributes | |
bool | FutureProofConfigs {true} |
True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone. | |
MotorOutputConfigs | MotorOutput |
Configs that directly affect motor output. | |
CurrentLimitsConfigs | CurrentLimits |
Configs that directly affect current limiting features. | |
VoltageConfigs | Voltage |
Configs that affect Voltage control types. | |
ExternalFeedbackConfigs | ExternalFeedback |
Configs that affect the external feedback sensor of this motor controller. | |
DifferentialSensorsConfigs | DifferentialSensors |
Configs related to sensors used for differential control of a mechanism. | |
DifferentialConstantsConfigs | DifferentialConstants |
Configs related to constants used for differential control of a mechanism. | |
OpenLoopRampsConfigs | OpenLoopRamps |
Configs that affect the open-loop control of this motor controller. | |
ClosedLoopRampsConfigs | ClosedLoopRamps |
Configs that affect the closed-loop control of this motor controller. | |
HardwareLimitSwitchConfigs | HardwareLimitSwitch |
Configs that change how the motor controller behaves under different limit switch states. | |
AudioConfigs | Audio |
Configs that affect audible components of the device. | |
SoftwareLimitSwitchConfigs | SoftwareLimitSwitch |
Configs that affect how software-limit switches behave. | |
MotionMagicConfigs | MotionMagic |
Configs for Motion Magic®. | |
CustomParamsConfigs | CustomParams |
Custom Params. | |
ClosedLoopGeneralConfigs | ClosedLoopGeneral |
Configs that affect general behavior during closed-looping. | |
CommutationConfigs | Commutation |
Configs that determine motor selection and commutation. | |
Slot0Configs | Slot0 |
Gains for the specified slot. | |
Slot1Configs | Slot1 |
Gains for the specified slot. | |
Slot2Configs | Slot2 |
Gains for the specified slot. | |
Class description for the Talon FXS motor controller.
This handles the configurations for the hardware::TalonFXS
|
constexprdefault |
|
inlinevirtual |
Take a string and deserialize it to this configuration.
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlinevirtual |
Get the serialized form of this configuration.
Implements ctre::phoenix6::ISerializable.
|
inlinevirtual |
Get the string representation of this configuration.
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlineconstexpr |
Modifies this configuration's Audio parameter and returns itself for method-chaining and easier to use config API.
Configs that affect audible components of the device.
Includes configuration for the beep on boot.
newAudio | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's ClosedLoopGeneral parameter and returns itself for method-chaining and easier to use config API.
Configs that affect general behavior during closed-looping.
Includes Continuous Wrap features.
newClosedLoopGeneral | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's ClosedLoopRamps parameter and returns itself for method-chaining and easier to use config API.
Configs that affect the closed-loop control of this motor controller.
Closed-loop ramp rates for the various control types.
newClosedLoopRamps | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's Commutation parameter and returns itself for method-chaining and easier to use config API.
Configs that determine motor selection and commutation.
Set these configs to match your motor setup before commanding motor output.
newCommutation | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's CurrentLimits parameter and returns itself for method-chaining and easier to use config API.
Configs that directly affect current limiting features.
Contains the supply/stator current limit thresholds and whether to enable them.
newCurrentLimits | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.
Custom Params.
Custom paramaters that have no real impact on controller.
newCustomParams | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's DifferentialConstants parameter and returns itself for method-chaining and easier to use config API.
Configs related to constants used for differential control of a mechanism.
Includes the differential peak outputs.
newDifferentialConstants | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's DifferentialSensors parameter and returns itself for method-chaining and easier to use config API.
Configs related to sensors used for differential control of a mechanism.
Includes the differential sensor sources and IDs.
newDifferentialSensors | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's ExternalFeedback parameter and returns itself for method-chaining and easier to use config API.
Configs that affect the external feedback sensor of this motor controller.
Includes feedback sensor source, offsets and sensor phase for the feedback sensor, and various ratios to describe the relationship between the sensor and the mechanism for closed looping.
newExternalFeedback | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's HardwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.
Configs that change how the motor controller behaves under different limit switch states.
Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.
newHardwareLimitSwitch | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's MotionMagic parameter and returns itself for method-chaining and easier to use config API.
Configs for Motion Magic®.
Includes Velocity, Acceleration, Jerk, and Expo parameters.
newMotionMagic | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's MotorOutput parameter and returns itself for method-chaining and easier to use config API.
Configs that directly affect motor output.
Includes motor invert, neutral mode, and other features related to motor output.
newMotorOutput | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's OpenLoopRamps parameter and returns itself for method-chaining and easier to use config API.
Configs that affect the open-loop control of this motor controller.
Open-loop ramp rates for the various control types.
newOpenLoopRamps | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's Slot0 parameter and returns itself for method-chaining and easier to use config API.
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
newSlot0 | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's Slot1 parameter and returns itself for method-chaining and easier to use config API.
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
newSlot1 | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's Slot2 parameter and returns itself for method-chaining and easier to use config API.
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
newSlot2 | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.
Configs that affect how software-limit switches behave.
Includes enabling software-limit switches and the threshold at which they are tripped.
newSoftwareLimitSwitch | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's Voltage parameter and returns itself for method-chaining and easier to use config API.
Configs that affect Voltage control types.
Includes peak output voltages and other configs affecting voltage measurements.
newVoltage | Parameter to modify |
AudioConfigs ctre::phoenix6::configs::TalonFXSConfiguration::Audio |
Configs that affect audible components of the device.
Includes configuration for the beep on boot.
ClosedLoopGeneralConfigs ctre::phoenix6::configs::TalonFXSConfiguration::ClosedLoopGeneral |
Configs that affect general behavior during closed-looping.
Includes Continuous Wrap features.
ClosedLoopRampsConfigs ctre::phoenix6::configs::TalonFXSConfiguration::ClosedLoopRamps |
Configs that affect the closed-loop control of this motor controller.
Closed-loop ramp rates for the various control types.
CommutationConfigs ctre::phoenix6::configs::TalonFXSConfiguration::Commutation |
Configs that determine motor selection and commutation.
Set these configs to match your motor setup before commanding motor output.
CurrentLimitsConfigs ctre::phoenix6::configs::TalonFXSConfiguration::CurrentLimits |
Configs that directly affect current limiting features.
Contains the supply/stator current limit thresholds and whether to enable them.
CustomParamsConfigs ctre::phoenix6::configs::TalonFXSConfiguration::CustomParams |
Custom Params.
Custom paramaters that have no real impact on controller.
DifferentialConstantsConfigs ctre::phoenix6::configs::TalonFXSConfiguration::DifferentialConstants |
Configs related to constants used for differential control of a mechanism.
Includes the differential peak outputs.
DifferentialSensorsConfigs ctre::phoenix6::configs::TalonFXSConfiguration::DifferentialSensors |
Configs related to sensors used for differential control of a mechanism.
Includes the differential sensor sources and IDs.
ExternalFeedbackConfigs ctre::phoenix6::configs::TalonFXSConfiguration::ExternalFeedback |
Configs that affect the external feedback sensor of this motor controller.
Includes feedback sensor source, offsets and sensor phase for the feedback sensor, and various ratios to describe the relationship between the sensor and the mechanism for closed looping.
bool ctre::phoenix6::configs::TalonFXSConfiguration::FutureProofConfigs {true} |
True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.
This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.
This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.
HardwareLimitSwitchConfigs ctre::phoenix6::configs::TalonFXSConfiguration::HardwareLimitSwitch |
Configs that change how the motor controller behaves under different limit switch states.
Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.
MotionMagicConfigs ctre::phoenix6::configs::TalonFXSConfiguration::MotionMagic |
Configs for Motion Magic®.
Includes Velocity, Acceleration, Jerk, and Expo parameters.
MotorOutputConfigs ctre::phoenix6::configs::TalonFXSConfiguration::MotorOutput |
Configs that directly affect motor output.
Includes motor invert, neutral mode, and other features related to motor output.
OpenLoopRampsConfigs ctre::phoenix6::configs::TalonFXSConfiguration::OpenLoopRamps |
Configs that affect the open-loop control of this motor controller.
Open-loop ramp rates for the various control types.
Slot0Configs ctre::phoenix6::configs::TalonFXSConfiguration::Slot0 |
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
Slot1Configs ctre::phoenix6::configs::TalonFXSConfiguration::Slot1 |
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
Slot2Configs ctre::phoenix6::configs::TalonFXSConfiguration::Slot2 |
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
SoftwareLimitSwitchConfigs ctre::phoenix6::configs::TalonFXSConfiguration::SoftwareLimitSwitch |
Configs that affect how software-limit switches behave.
Includes enabling software-limit switches and the threshold at which they are tripped.
VoltageConfigs ctre::phoenix6::configs::TalonFXSConfiguration::Voltage |
Configs that affect Voltage control types.
Includes peak output voltages and other configs affecting voltage measurements.