Package com.ctre.phoenix6.configs
Class ClosedLoopGeneralConfigs
java.lang.Object
com.ctre.phoenix6.configs.ClosedLoopGeneralConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
Configs that affect general behavior during closed-looping.
Includes Continuous Wrap features.
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Wrap position error within [-0.5,+0.5) mechanism rotations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String to_deserialize) toString()
withContinuousWrap
(boolean newContinuousWrap) Modifies this configuration's ContinuousWrap parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
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
-
ClosedLoopGeneralConfigs
public ClosedLoopGeneralConfigs()
-
-
Method Details
-
withContinuousWrap
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
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-