Class TalonFXSConfiguration
- All Implemented Interfaces:
ParentConfiguration, Cloneable
TalonFXS.-
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 determine motor selection and commutation.Configs that directly affect current limiting features.Configs related to using a custom brushless motor that is not formally supported by Talon FXS.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 external feedback sensor of this motor controller.Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached.booleanTrue 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 Voltage control types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration.final StringGet the serialized form of this configuration.toString()final TalonFXSConfigurationwithAudio(AudioConfigs newAudio) Modifies this configuration's Audio parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithClosedLoopGeneral(ClosedLoopGeneralConfigs newClosedLoopGeneral) Modifies this configuration's ClosedLoopGeneral parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithClosedLoopRamps(ClosedLoopRampsConfigs newClosedLoopRamps) Modifies this configuration's ClosedLoopRamps parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithCommutation(CommutationConfigs newCommutation) Modifies this configuration's Commutation parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithCurrentLimits(CurrentLimitsConfigs newCurrentLimits) Modifies this configuration's CurrentLimits parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithCustomBrushlessMotor(CustomBrushlessMotorConfigs newCustomBrushlessMotor) Modifies this configuration's CustomBrushlessMotor parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithCustomParams(CustomParamsConfigs newCustomParams) Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithDifferentialConstants(DifferentialConstantsConfigs newDifferentialConstants) Modifies this configuration's DifferentialConstants parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithDifferentialSensors(DifferentialSensorsConfigs newDifferentialSensors) Modifies this configuration's DifferentialSensors parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithExternalFeedback(ExternalFeedbackConfigs newExternalFeedback) Modifies this configuration's ExternalFeedback parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithExternalTemp(ExternalTempConfigs newExternalTemp) Modifies this configuration's ExternalTemp parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithHardwareLimitSwitch(HardwareLimitSwitchConfigs newHardwareLimitSwitch) Modifies this configuration's HardwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithMotionMagic(MotionMagicConfigs newMotionMagic) Modifies this configuration's MotionMagic parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithMotorOutput(MotorOutputConfigs newMotorOutput) Modifies this configuration's MotorOutput parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithOpenLoopRamps(OpenLoopRampsConfigs newOpenLoopRamps) Modifies this configuration's OpenLoopRamps parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithSlot0(Slot0Configs newSlot0) Modifies this configuration's Slot0 parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithSlot1(Slot1Configs newSlot1) Modifies this configuration's Slot1 parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithSlot2(Slot2Configs newSlot2) Modifies this configuration's Slot2 parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithSoftwareLimitSwitch(SoftwareLimitSwitchConfigs newSoftwareLimitSwitch) Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.final TalonFXSConfigurationwithVoltage(VoltageConfigs newVoltage) Modifies this configuration's Voltage parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
FutureProofConfigs
public boolean FutureProofConfigsTrue 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:
-
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.
Parameter list:
-
ExternalFeedbackConfigs.SensorToMechanismRatio -
ExternalFeedbackConfigs.RotorToSensorRatio -
ExternalFeedbackConfigs.FeedbackRemoteSensorID -
ExternalFeedbackConfigs.VelocityFilterTimeConstant -
ExternalFeedbackConfigs.AbsoluteSensorOffset -
ExternalFeedbackConfigs.ExternalFeedbackSensorSource -
ExternalFeedbackConfigs.SensorPhase -
ExternalFeedbackConfigs.QuadratureEdgesPerRotation -
ExternalFeedbackConfigs.AbsoluteSensorDiscontinuityPoint
-
-
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:
-
Commutation
Configs that determine motor selection and commutation.Set these configs to match your motor setup before commanding motor output.
Parameter list:
-
CustomBrushlessMotor
Configs related to using a custom brushless motor that is not formally supported by Talon FXS.Configs are only used when Motor Arrangement is set to Custom Brushless Motor. Note this feature will only work device is not FRC-Locked.
Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.
Parameter list:
-
ExternalTemp
Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached.Configs are only used when Motor Arrangement is set to Custom Brushless Motor or Brushed. Note this feature will only work device is not FRC-Locked.
Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.
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
-
TalonFXSConfiguration
public TalonFXSConfiguration()
-
-
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
-
withExternalFeedback
public final TalonFXSConfiguration withExternalFeedback(ExternalFeedbackConfigs newExternalFeedback) 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.
Parameter list:
-
ExternalFeedbackConfigs.SensorToMechanismRatio -
ExternalFeedbackConfigs.RotorToSensorRatio -
ExternalFeedbackConfigs.FeedbackRemoteSensorID -
ExternalFeedbackConfigs.VelocityFilterTimeConstant -
ExternalFeedbackConfigs.AbsoluteSensorOffset -
ExternalFeedbackConfigs.ExternalFeedbackSensorSource -
ExternalFeedbackConfigs.SensorPhase -
ExternalFeedbackConfigs.QuadratureEdgesPerRotation -
ExternalFeedbackConfigs.AbsoluteSensorDiscontinuityPoint
- Parameters:
newExternalFeedback- Parameter to modify- Returns:
- Itself
-
-
withDifferentialSensors
public final TalonFXSConfiguration 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 final TalonFXSConfiguration 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 final TalonFXSConfiguration 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 final TalonFXSConfiguration 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
public final TalonFXSConfiguration withClosedLoopGeneral(ClosedLoopGeneralConfigs newClosedLoopGeneral) 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
-
withCommutation
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.
Parameter list:
- Parameters:
newCommutation- Parameter to modify- Returns:
- Itself
-
withCustomBrushlessMotor
public final TalonFXSConfiguration withCustomBrushlessMotor(CustomBrushlessMotorConfigs newCustomBrushlessMotor) Modifies this configuration's CustomBrushlessMotor parameter and returns itself for method-chaining and easier to use config API.Configs related to using a custom brushless motor that is not formally supported by Talon FXS.
Configs are only used when Motor Arrangement is set to Custom Brushless Motor. Note this feature will only work device is not FRC-Locked.
Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.
Parameter list:
- Parameters:
newCustomBrushlessMotor- Parameter to modify- Returns:
- Itself
-
withExternalTemp
Modifies this configuration's ExternalTemp parameter and returns itself for method-chaining and easier to use config API.Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached.
Configs are only used when Motor Arrangement is set to Custom Brushless Motor or Brushed. Note this feature will only work device is not FRC-Locked.
Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.
Parameter list:
- Parameters:
newExternalTemp- 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:
serializein interfaceParentConfiguration- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration.- Specified by:
deserializein interfaceParentConfiguration- Parameters:
to_deserialize- The serialized configuration- Returns:
- Return code of the deserialize method
-
clone
-