Package com.ctre.phoenix6.configs
Class DifferentialConstantsConfigs
java.lang.Object
com.ctre.phoenix6.configs.DifferentialConstantsConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
Configs related to constants used for differential control of a
mechanism.
Includes the differential peak outputs.
-
Field Summary
Modifier and TypeFieldDescriptiondouble
Maximum differential output during duty cycle based differential control modes.double
Maximum differential output during torque current based differential control modes.double
Maximum differential output during voltage based differential control modes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String to_deserialize) Helper method to get this configuration's PeakDifferentialTorqueCurrent parameter converted to a unit type.Helper method to get this configuration's PeakDifferentialVoltage parameter converted to a unit type.toString()
withPeakDifferentialDutyCycle
(double newPeakDifferentialDutyCycle) Modifies this configuration's PeakDifferentialDutyCycle parameter and returns itself for method-chaining and easier to use config API.withPeakDifferentialTorqueCurrent
(double newPeakDifferentialTorqueCurrent) Modifies this configuration's PeakDifferentialTorqueCurrent parameter and returns itself for method-chaining and easier to use config API.withPeakDifferentialTorqueCurrent
(Current newPeakDifferentialTorqueCurrent) Modifies this configuration's PeakDifferentialTorqueCurrent parameter and returns itself for method-chaining and easier to use config API.withPeakDifferentialVoltage
(double newPeakDifferentialVoltage) Modifies this configuration's PeakDifferentialVoltage parameter and returns itself for method-chaining and easier to use config API.withPeakDifferentialVoltage
(Voltage newPeakDifferentialVoltage) Modifies this configuration's PeakDifferentialVoltage parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
PeakDifferentialDutyCycle
Maximum differential output during duty cycle based differential control modes.- Minimum Value: 0.0
- Maximum Value: 2.0
- Default Value: 2
- Units: fractional
-
PeakDifferentialVoltage
Maximum differential output during voltage based differential control modes.- Minimum Value: 0.0
- Maximum Value: 32
- Default Value: 32
- Units: V
-
PeakDifferentialTorqueCurrent
Maximum differential output during torque current based differential control modes.- Minimum Value: 0.0
- Maximum Value: 1600
- Default Value: 1600
- Units: A
-
-
Constructor Details
-
DifferentialConstantsConfigs
public DifferentialConstantsConfigs()
-
-
Method Details
-
withPeakDifferentialDutyCycle
public DifferentialConstantsConfigs withPeakDifferentialDutyCycle(double newPeakDifferentialDutyCycle) Modifies this configuration's PeakDifferentialDutyCycle parameter and returns itself for method-chaining and easier to use config API.Maximum differential output during duty cycle based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 2.0
- Default Value: 2
- Units: fractional
- Parameters:
newPeakDifferentialDutyCycle
- Parameter to modify- Returns:
- Itself
-
withPeakDifferentialVoltage
Modifies this configuration's PeakDifferentialVoltage parameter and returns itself for method-chaining and easier to use config API.Maximum differential output during voltage based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 32
- Default Value: 32
- Units: V
- Parameters:
newPeakDifferentialVoltage
- Parameter to modify- Returns:
- Itself
-
withPeakDifferentialVoltage
Modifies this configuration's PeakDifferentialVoltage parameter and returns itself for method-chaining and easier to use config API.Maximum differential output during voltage based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 32
- Default Value: 32
- Units: V
- Parameters:
newPeakDifferentialVoltage
- Parameter to modify- Returns:
- Itself
-
getPeakDifferentialVoltageMeasure
Helper method to get this configuration's PeakDifferentialVoltage parameter converted to a unit type. If not using the Java units library,PeakDifferentialVoltage
can be accessed directly instead.Maximum differential output during voltage based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 32
- Default Value: 32
- Units: V
- Returns:
- PeakDifferentialVoltage
-
withPeakDifferentialTorqueCurrent
public DifferentialConstantsConfigs withPeakDifferentialTorqueCurrent(double newPeakDifferentialTorqueCurrent) Modifies this configuration's PeakDifferentialTorqueCurrent parameter and returns itself for method-chaining and easier to use config API.Maximum differential output during torque current based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 1600
- Default Value: 1600
- Units: A
- Parameters:
newPeakDifferentialTorqueCurrent
- Parameter to modify- Returns:
- Itself
-
withPeakDifferentialTorqueCurrent
public DifferentialConstantsConfigs withPeakDifferentialTorqueCurrent(Current newPeakDifferentialTorqueCurrent) Modifies this configuration's PeakDifferentialTorqueCurrent parameter and returns itself for method-chaining and easier to use config API.Maximum differential output during torque current based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 1600
- Default Value: 1600
- Units: A
- Parameters:
newPeakDifferentialTorqueCurrent
- Parameter to modify- Returns:
- Itself
-
getPeakDifferentialTorqueCurrentMeasure
Helper method to get this configuration's PeakDifferentialTorqueCurrent parameter converted to a unit type. If not using the Java units library,PeakDifferentialTorqueCurrent
can be accessed directly instead.Maximum differential output during torque current based differential control modes.
- Minimum Value: 0.0
- Maximum Value: 1600
- Default Value: 1600
- Units: A
- Returns:
- PeakDifferentialTorqueCurrent
-
toString
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-