Class TalonFXConfiguration

java.lang.Object
com.ctre.phoenix6.configs.TalonFXConfiguration
All Implemented Interfaces:
ParentConfiguration, ISerializable

public class TalonFXConfiguration
extends Object
implements ParentConfiguration
Class description for the Talon FX integrated motor controller. This handles the configurations for the TalonFX
  • Field Details

  • Constructor Details

  • 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.

      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.

      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.

      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.

      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.

      Parameters:
      newFeedback - Parameter to modify
      Returns:
      Itself
    • withDifferentialSensors

      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.

      Parameters:
      newDifferentialSensors - Parameter to modify
      Returns:
      Itself
    • withDifferentialConstants

      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.

      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.

      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.

      Parameters:
      newClosedLoopRamps - Parameter to modify
      Returns:
      Itself
    • withHardwareLimitSwitch

      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.

      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.

      Parameters:
      newAudio - Parameter to modify
      Returns:
      Itself
    • withSoftwareLimitSwitch

      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.

      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.

      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.

      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.

      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.

      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.

      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.

      Parameters:
      newSlot2 - Parameter to modify
      Returns:
      Itself
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • serialize

      public String serialize()
      Get the serialized form of this configuration
      Specified by:
      serialize in interface ISerializable
      Returns:
      Serialized form of this config group
    • deserialize

      public StatusCode deserialize​(String to_deserialize)
      Take a string and deserialize it to this configuration
      Specified by:
      deserialize in interface ParentConfiguration
      Returns:
      Return code of the deserialize method