Class TalonFXSConfiguration
Class description for the Talon FXS motor controller.
This defines all configurations for the TalonFXS.public class TalonFXSConfiguration : IParentConfiguration, ISerializable, ICloneable
- Inheritance
-
TalonFXSConfiguration
- Implements
- Inherited Members
Fields
Audio
Configs that affect audible components of the device.
Includes configuration for the beep on boot. Parameter list:public AudioConfigs Audio
Field Value
ClosedLoopGeneral
Configs that affect general behavior during closed-looping.
Includes Continuous Wrap features. Parameter list:public ClosedLoopGeneralConfigs ClosedLoopGeneral
Field Value
ClosedLoopRamps
Configs that affect the closed-loop control of this motor controller.
Closed-loop ramp rates for the various control types. Parameter list:public ClosedLoopRampsConfigs ClosedLoopRamps
Field Value
Commutation
Configs that determine motor selection and commutation.
Set these configs to match your motor setup before commanding motor output. Parameter list:public CommutationConfigs Commutation
Field Value
CurrentLimits
Configs that directly affect current limiting features.
Contains the supply/stator current limit thresholds and whether to enable them. Parameter list:public CurrentLimitsConfigs CurrentLimits
Field Value
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:public CustomBrushlessMotorConfigs CustomBrushlessMotor
Field Value
CustomParams
Custom Params.
Custom paramaters that have no real impact on controller. Parameter list:public CustomParamsConfigs CustomParams
Field Value
DifferentialConstants
Configs related to constants used for differential control of a mechanism.
Includes the differential peak outputs. Parameter list:public DifferentialConstantsConfigs DifferentialConstants
Field Value
DifferentialSensors
Configs related to sensors used for differential control of a mechanism.
Includes the differential sensor sources and IDs. Parameter list:public DifferentialSensorsConfigs DifferentialSensors
Field Value
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:public ExternalFeedbackConfigs ExternalFeedback
Field Value
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:public ExternalTempConfigs ExternalTemp
Field Value
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.public bool FutureProofConfigs
Field Value
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:public HardwareLimitSwitchConfigs HardwareLimitSwitch
Field Value
MotionMagic
Configs for Motion MagicĀ®.
Includes Velocity, Acceleration, Jerk, and Expo parameters. Parameter list:public MotionMagicConfigs MotionMagic
Field Value
MotorOutput
Configs that directly affect motor output.
Includes motor invert, neutral mode, and other features related to motor output. Parameter list:public MotorOutputConfigs MotorOutput
Field Value
OpenLoopRamps
Configs that affect the open-loop control of this motor controller.
Open-loop ramp rates for the various control types. Parameter list:public OpenLoopRampsConfigs OpenLoopRamps
Field Value
Slot0
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests. Parameter list:public Slot0Configs Slot0
Field Value
Slot1
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests. Parameter list:public Slot1Configs Slot1
Field Value
Slot2
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests. Parameter list:public Slot2Configs Slot2
Field Value
SoftwareLimitSwitch
Configs that affect how software-limit switches behave.
Includes enabling software-limit switches and the threshold at which they are tripped. Parameter list:public SoftwareLimitSwitchConfigs SoftwareLimitSwitch
Field Value
Voltage
Configs that affect Voltage control types.
Includes peak output voltages and other configs affecting voltage measurements. Parameter list:public VoltageConfigs Voltage
Field Value
Methods
Clone()
Creates a copy of this configuration.
public TalonFXSConfiguration Clone()
Returns
Deserialize(string)
Take a string and deserialize it to this configuration
public StatusCode Deserialize(string to_deserialize)
Parameters
to_deserializestring
Returns
- StatusCode
Return code of the deserialize method
Serialize()
Get the serialized form of this configuration
public string Serialize()
Returns
- string
Serialized form of this config group
ToString()
Provides the string representation of this object
public override string ToString()
Returns
WithAudio(AudioConfigs)
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:public TalonFXSConfiguration WithAudio(AudioConfigs newAudio)
Parameters
newAudioAudioConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithClosedLoopGeneral(ClosedLoopGeneralConfigs)
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:public TalonFXSConfiguration WithClosedLoopGeneral(ClosedLoopGeneralConfigs newClosedLoopGeneral)
Parameters
newClosedLoopGeneralClosedLoopGeneralConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithClosedLoopRamps(ClosedLoopRampsConfigs)
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:public TalonFXSConfiguration WithClosedLoopRamps(ClosedLoopRampsConfigs newClosedLoopRamps)
Parameters
newClosedLoopRampsClosedLoopRampsConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithCommutation(CommutationConfigs)
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:public TalonFXSConfiguration WithCommutation(CommutationConfigs newCommutation)
Parameters
newCommutationCommutationConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithCurrentLimits(CurrentLimitsConfigs)
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:public TalonFXSConfiguration WithCurrentLimits(CurrentLimitsConfigs newCurrentLimits)
Parameters
newCurrentLimitsCurrentLimitsConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithCustomBrushlessMotor(CustomBrushlessMotorConfigs)
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:public TalonFXSConfiguration WithCustomBrushlessMotor(CustomBrushlessMotorConfigs newCustomBrushlessMotor)
Parameters
newCustomBrushlessMotorCustomBrushlessMotorConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithCustomParams(CustomParamsConfigs)
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:public TalonFXSConfiguration WithCustomParams(CustomParamsConfigs newCustomParams)
Parameters
newCustomParamsCustomParamsConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithDifferentialConstants(DifferentialConstantsConfigs)
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:public TalonFXSConfiguration WithDifferentialConstants(DifferentialConstantsConfigs newDifferentialConstants)
Parameters
newDifferentialConstantsDifferentialConstantsConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithDifferentialSensors(DifferentialSensorsConfigs)
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:public TalonFXSConfiguration WithDifferentialSensors(DifferentialSensorsConfigs newDifferentialSensors)
Parameters
newDifferentialSensorsDifferentialSensorsConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithExternalFeedback(ExternalFeedbackConfigs)
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:public TalonFXSConfiguration WithExternalFeedback(ExternalFeedbackConfigs newExternalFeedback)
Parameters
newExternalFeedbackExternalFeedbackConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithExternalTemp(ExternalTempConfigs)
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:public TalonFXSConfiguration WithExternalTemp(ExternalTempConfigs newExternalTemp)
Parameters
newExternalTempExternalTempConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithHardwareLimitSwitch(HardwareLimitSwitchConfigs)
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:public TalonFXSConfiguration WithHardwareLimitSwitch(HardwareLimitSwitchConfigs newHardwareLimitSwitch)
Parameters
newHardwareLimitSwitchHardwareLimitSwitchConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithMotionMagic(MotionMagicConfigs)
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:public TalonFXSConfiguration WithMotionMagic(MotionMagicConfigs newMotionMagic)
Parameters
newMotionMagicMotionMagicConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithMotorOutput(MotorOutputConfigs)
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:public TalonFXSConfiguration WithMotorOutput(MotorOutputConfigs newMotorOutput)
Parameters
newMotorOutputMotorOutputConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithOpenLoopRamps(OpenLoopRampsConfigs)
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:public TalonFXSConfiguration WithOpenLoopRamps(OpenLoopRampsConfigs newOpenLoopRamps)
Parameters
newOpenLoopRampsOpenLoopRampsConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithSlot0(Slot0Configs)
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:public TalonFXSConfiguration WithSlot0(Slot0Configs newSlot0)
Parameters
newSlot0Slot0ConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithSlot1(Slot1Configs)
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:public TalonFXSConfiguration WithSlot1(Slot1Configs newSlot1)
Parameters
newSlot1Slot1ConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithSlot2(Slot2Configs)
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:public TalonFXSConfiguration WithSlot2(Slot2Configs newSlot2)
Parameters
newSlot2Slot2ConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithSoftwareLimitSwitch(SoftwareLimitSwitchConfigs)
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:public TalonFXSConfiguration WithSoftwareLimitSwitch(SoftwareLimitSwitchConfigs newSoftwareLimitSwitch)
Parameters
newSoftwareLimitSwitchSoftwareLimitSwitchConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself
WithVoltage(VoltageConfigs)
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:public TalonFXSConfiguration WithVoltage(VoltageConfigs newVoltage)
Parameters
newVoltageVoltageConfigsParameter to modify
Returns
- TalonFXSConfiguration
Itself