Class TalonFXConfiguration
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
TalonFX
-
Field Summary
FieldsModifier and TypeFieldDescriptionConfigs that affect audible components of the device.Configs that affect general behavior during closed-looping.Configs that affect the closed-loop control of this motor controller.Configs that directly affect current limiting features.Custom Params.Configs related to constants used for differential control of a mechanism.Configs related to sensors used for differential control of a mechanism.Configs that affect the feedback of this motor controller.boolean
True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.Configs that change how the motor controller behaves under different limit switch states.Configs for Motion Magic®.Configs that directly affect motor output.Configs that affect the open-loop control of this motor controller.Gains for the specified slot.Gains for the specified slot.Gains for the specified slot.Configs that affect how software-limit switches behave.Configs that affect Torque Current control types.Configs that affect Voltage control types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String to_deserialize) Take a string and deserialize it to this configurationGet the serialized form of this configurationtoString()
withAudio
(AudioConfigs newAudio) Modifies this configuration's Audio parameter and returns itself for method-chaining and easier to use config API.withClosedLoopGeneral
(ClosedLoopGeneralConfigs newClosedLoopGeneral) Modifies this configuration's ClosedLoopGeneral parameter and returns itself for method-chaining and easier to use config API.withClosedLoopRamps
(ClosedLoopRampsConfigs newClosedLoopRamps) Modifies this configuration's ClosedLoopRamps parameter and returns itself for method-chaining and easier to use config API.withCurrentLimits
(CurrentLimitsConfigs newCurrentLimits) Modifies this configuration's CurrentLimits parameter and returns itself for method-chaining and easier to use config API.withCustomParams
(CustomParamsConfigs newCustomParams) Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.withDifferentialConstants
(DifferentialConstantsConfigs newDifferentialConstants) Modifies this configuration's DifferentialConstants parameter and returns itself for method-chaining and easier to use config API.withDifferentialSensors
(DifferentialSensorsConfigs newDifferentialSensors) Modifies this configuration's DifferentialSensors parameter and returns itself for method-chaining and easier to use config API.withFeedback
(FeedbackConfigs newFeedback) Modifies this configuration's Feedback parameter and returns itself for method-chaining and easier to use config API.withHardwareLimitSwitch
(HardwareLimitSwitchConfigs newHardwareLimitSwitch) Modifies this configuration's HardwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.withMotionMagic
(MotionMagicConfigs newMotionMagic) Modifies this configuration's MotionMagic parameter and returns itself for method-chaining and easier to use config API.withMotorOutput
(MotorOutputConfigs newMotorOutput) Modifies this configuration's MotorOutput parameter and returns itself for method-chaining and easier to use config API.withOpenLoopRamps
(OpenLoopRampsConfigs newOpenLoopRamps) Modifies this configuration's OpenLoopRamps parameter and returns itself for method-chaining and easier to use config API.withSlot0
(Slot0Configs newSlot0) Modifies this configuration's Slot0 parameter and returns itself for method-chaining and easier to use config API.withSlot1
(Slot1Configs newSlot1) Modifies this configuration's Slot1 parameter and returns itself for method-chaining and easier to use config API.withSlot2
(Slot2Configs newSlot2) Modifies this configuration's Slot2 parameter and returns itself for method-chaining and easier to use config API.withSoftwareLimitSwitch
(SoftwareLimitSwitchConfigs newSoftwareLimitSwitch) Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.withTorqueCurrent
(TorqueCurrentConfigs newTorqueCurrent) Modifies this configuration's TorqueCurrent parameter and returns itself for method-chaining and easier to use config API.withVoltage
(VoltageConfigs newVoltage) Modifies this configuration's Voltage parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
FutureProofConfigs
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.
-
MotorOutput
Configs that directly affect motor output.Includes motor invert, neutral mode, and other features related to motor output.
Parameter list:
-
CurrentLimits
Configs that directly affect current limiting features.Contains the supply/stator current limit thresholds and whether to enable them.
Parameter list:
-
Voltage
Configs that affect Voltage control types.Includes peak output voltages and other configs affecting voltage measurements.
Parameter list:
-
TorqueCurrent
Configs that affect Torque Current control types.Includes the maximum and minimum applied torque output and the neutral deadband used during TorqueCurrentFOC requests.
Parameter list:
-
Feedback
Configs that affect the feedback of this motor controller.Includes feedback sensor source, any offsets for the feedback sensor, and various ratios to describe the relationship between the sensor and the mechanism for closed looping.
Parameter list:
-
DifferentialSensors
Configs related to sensors used for differential control of a mechanism.Includes the differential sensor sources and IDs.
Parameter list:
-
DifferentialConstants
Configs related to constants used for differential control of a mechanism.Includes the differential peak outputs.
Parameter list:
-
OpenLoopRamps
Configs that affect the open-loop control of this motor controller.Open-loop ramp rates for the various control types.
Parameter list:
-
ClosedLoopRamps
Configs that affect the closed-loop control of this motor controller.Closed-loop ramp rates for the various control types.
Parameter list:
-
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.
Parameter list:
-
HardwareLimitSwitchConfigs.ForwardLimitType
-
HardwareLimitSwitchConfigs.ForwardLimitAutosetPositionEnable
-
HardwareLimitSwitchConfigs.ForwardLimitAutosetPositionValue
-
HardwareLimitSwitchConfigs.ForwardLimitEnable
-
HardwareLimitSwitchConfigs.ForwardLimitSource
-
HardwareLimitSwitchConfigs.ForwardLimitRemoteSensorID
-
HardwareLimitSwitchConfigs.ReverseLimitType
-
HardwareLimitSwitchConfigs.ReverseLimitAutosetPositionEnable
-
HardwareLimitSwitchConfigs.ReverseLimitAutosetPositionValue
-
HardwareLimitSwitchConfigs.ReverseLimitEnable
-
HardwareLimitSwitchConfigs.ReverseLimitSource
-
HardwareLimitSwitchConfigs.ReverseLimitRemoteSensorID
-
-
Audio
Configs that affect audible components of the device.Includes configuration for the beep on boot.
Parameter list:
-
SoftwareLimitSwitch
Configs that affect how software-limit switches behave.Includes enabling software-limit switches and the threshold at which they are tripped.
Parameter list:
-
MotionMagic
Configs for Motion Magic®.Includes Velocity, Acceleration, Jerk, and Expo parameters.
Parameter list:
-
CustomParams
Custom Params.Custom paramaters that have no real impact on controller.
Parameter list:
-
ClosedLoopGeneral
Configs that affect general behavior during closed-looping.Includes Continuous Wrap features.
Parameter list:
-
Slot0
Gains for the specified slot.If this slot is selected, these gains are used in closed loop control requests.
Parameter list:
-
Slot1
Gains for the specified slot.If this slot is selected, these gains are used in closed loop control requests.
Parameter list:
-
Slot2
Gains for the specified slot.If this slot is selected, these gains are used in closed loop control requests.
Parameter list:
-
-
Constructor Details
-
TalonFXConfiguration
public TalonFXConfiguration()
-
-
Method Details
-
withMotorOutput
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.
Parameter list:
- Parameters:
newMotorOutput
- Parameter to modify- Returns:
- Itself
-
withCurrentLimits
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.
Parameter list:
- Parameters:
newCurrentLimits
- Parameter to modify- Returns:
- Itself
-
withVoltage
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.
Parameter list:
- Parameters:
newVoltage
- Parameter to modify- Returns:
- Itself
-
withTorqueCurrent
Modifies this configuration's TorqueCurrent parameter and returns itself for method-chaining and easier to use config API.Configs that affect Torque Current control types.
Includes the maximum and minimum applied torque output and the neutral deadband used during TorqueCurrentFOC requests.
Parameter list:
- Parameters:
newTorqueCurrent
- Parameter to modify- Returns:
- Itself
-
withFeedback
Modifies this configuration's Feedback parameter and returns itself for method-chaining and easier to use config API.Configs that affect the feedback of this motor controller.
Includes feedback sensor source, any offsets for the feedback sensor, and various ratios to describe the relationship between the sensor and the mechanism for closed looping.
Parameter list:
- Parameters:
newFeedback
- Parameter to modify- Returns:
- Itself
-
withDifferentialSensors
public TalonFXConfiguration withDifferentialSensors(DifferentialSensorsConfigs newDifferentialSensors) 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.
Parameter list:
- Parameters:
newDifferentialSensors
- Parameter to modify- Returns:
- Itself
-
withDifferentialConstants
public TalonFXConfiguration withDifferentialConstants(DifferentialConstantsConfigs newDifferentialConstants) 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.
Parameter list:
- Parameters:
newDifferentialConstants
- Parameter to modify- Returns:
- Itself
-
withOpenLoopRamps
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.
Parameter list:
- Parameters:
newOpenLoopRamps
- Parameter to modify- Returns:
- Itself
-
withClosedLoopRamps
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.
Parameter list:
- Parameters:
newClosedLoopRamps
- Parameter to modify- Returns:
- Itself
-
withHardwareLimitSwitch
public TalonFXConfiguration withHardwareLimitSwitch(HardwareLimitSwitchConfigs newHardwareLimitSwitch) 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.
Parameter list:
-
HardwareLimitSwitchConfigs.ForwardLimitType
-
HardwareLimitSwitchConfigs.ForwardLimitAutosetPositionEnable
-
HardwareLimitSwitchConfigs.ForwardLimitAutosetPositionValue
-
HardwareLimitSwitchConfigs.ForwardLimitEnable
-
HardwareLimitSwitchConfigs.ForwardLimitSource
-
HardwareLimitSwitchConfigs.ForwardLimitRemoteSensorID
-
HardwareLimitSwitchConfigs.ReverseLimitType
-
HardwareLimitSwitchConfigs.ReverseLimitAutosetPositionEnable
-
HardwareLimitSwitchConfigs.ReverseLimitAutosetPositionValue
-
HardwareLimitSwitchConfigs.ReverseLimitEnable
-
HardwareLimitSwitchConfigs.ReverseLimitSource
-
HardwareLimitSwitchConfigs.ReverseLimitRemoteSensorID
- Parameters:
newHardwareLimitSwitch
- Parameter to modify- Returns:
- Itself
-
-
withAudio
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.
Parameter list:
- Parameters:
newAudio
- Parameter to modify- Returns:
- Itself
-
withSoftwareLimitSwitch
public TalonFXConfiguration withSoftwareLimitSwitch(SoftwareLimitSwitchConfigs newSoftwareLimitSwitch) 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.
Parameter list:
- Parameters:
newSoftwareLimitSwitch
- Parameter to modify- Returns:
- Itself
-
withMotionMagic
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.
Parameter list:
- Parameters:
newMotionMagic
- Parameter to modify- Returns:
- Itself
-
withCustomParams
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.
Parameter list:
- Parameters:
newCustomParams
- Parameter to modify- Returns:
- Itself
-
withClosedLoopGeneral
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.
Parameter list:
- Parameters:
newClosedLoopGeneral
- Parameter to modify- Returns:
- Itself
-
withSlot0
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.
Parameter list:
- Parameters:
newSlot0
- Parameter to modify- Returns:
- Itself
-
withSlot1
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.
Parameter list:
- Parameters:
newSlot1
- Parameter to modify- Returns:
- Itself
-
withSlot2
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.
Parameter list:
- Parameters:
newSlot2
- Parameter to modify- Returns:
- Itself
-
toString
-
serialize
Get the serialized form of this configuration- Specified by:
serialize
in interfaceISerializable
- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration- Specified by:
deserialize
in interfaceParentConfiguration
- Returns:
- Return code of the deserialize method
-