Class TalonFXSConfiguration
- All Implemented Interfaces:
ParentConfiguration,ISerializable
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.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.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 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.withCommutation(CommutationConfigs newCommutation) Modifies this configuration's Commutation 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.withExternalFeedback(ExternalFeedbackConfigs newExternalFeedback) Modifies this configuration's ExternalFeedback 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.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:
-
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:
-
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
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 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 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 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 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
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
-
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 interfaceISerializable- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration- Specified by:
deserializein interfaceParentConfiguration- Returns:
- Return code of the deserialize method
-