Class ClosedLoopGeneralConfigs

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

public class ClosedLoopGeneralConfigs extends Object implements ParentConfiguration
Configs that affect general behavior during closed-looping.

Includes Continuous Wrap features.

  • Field Details

    • ContinuousWrap

      public boolean ContinuousWrap
      Wrap position error within [-0.5,+0.5) mechanism rotations. Typically used for continuous position closed-loops like swerve azimuth.

      This uses the mechanism rotation value. If there is a gear ratio between the sensor and the mechanism, make sure to apply a SensorToMechanismRatio so the closed loop operates on the full rotation.

      • Default Value: False
  • Constructor Details

  • Method Details

    • withContinuousWrap

      public ClosedLoopGeneralConfigs withContinuousWrap(boolean newContinuousWrap)
      Modifies this configuration's ContinuousWrap parameter and returns itself for method-chaining and easier to use config API.

      Wrap position error within [-0.5,+0.5) mechanism rotations. Typically used for continuous position closed-loops like swerve azimuth.

      This uses the mechanism rotation value. If there is a gear ratio between the sensor and the mechanism, make sure to apply a SensorToMechanismRatio so the closed loop operates on the full rotation.

      • Default Value: False
      Parameters:
      newContinuousWrap - Parameter to modify
      Returns:
      Itself
    • toString

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

      public StatusCode deserialize(String to_deserialize)
      Specified by:
      deserialize in interface ParentConfiguration
    • serialize

      public String serialize()
      Specified by:
      serialize in interface ISerializable