Class CommutationConfigs

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

public class CommutationConfigs extends Object implements ParentConfiguration, Cloneable
Configs that determine motor selection and commutation.

Set these configs to match your motor setup before commanding motor output.

  • Field Details

    • AdvancedHallSupport

      Requires Phoenix Pro; Improves commutation and velocity measurement for motors with hall sensors. Talon can use advanced features to improve commutation and velocity measurement when using a motor with hall sensors. This can improve peak efficiency by as high as 2% and reduce noise in the measured velocity.
    • MotorArrangement

      Selects the motor and motor connections used with Talon.

      This setting determines what kind of motor and sensors are used with the Talon. This also determines what signals are used on the JST and Gadgeteer port.

      Motor drive will not function correctly if this setting does not match the physical setup.

    • BrushedMotorWiring

      If a brushed motor is selected with Motor Arrangement, this config determines which of three leads to use.
  • Constructor Details

  • Method Details

    • withAdvancedHallSupport

      Modifies this configuration's AdvancedHallSupport parameter and returns itself for method-chaining and easier to use config API.

      Requires Phoenix Pro; Improves commutation and velocity measurement for motors with hall sensors. Talon can use advanced features to improve commutation and velocity measurement when using a motor with hall sensors. This can improve peak efficiency by as high as 2% and reduce noise in the measured velocity.

      Parameters:
      newAdvancedHallSupport - Parameter to modify
      Returns:
      Itself
    • withMotorArrangement

      Modifies this configuration's MotorArrangement parameter and returns itself for method-chaining and easier to use config API.

      Selects the motor and motor connections used with Talon.

      This setting determines what kind of motor and sensors are used with the Talon. This also determines what signals are used on the JST and Gadgeteer port.

      Motor drive will not function correctly if this setting does not match the physical setup.

      Parameters:
      newMotorArrangement - Parameter to modify
      Returns:
      Itself
    • withBrushedMotorWiring

      Modifies this configuration's BrushedMotorWiring parameter and returns itself for method-chaining and easier to use config API.

      If a brushed motor is selected with Motor Arrangement, this config determines which of three leads to use.

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

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

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

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

      Overrides:
      clone in class Object