Package com.ctre.phoenix6.configs
Class MotorOutputConfigs
java.lang.Object
com.ctre.phoenix6.configs.MotorOutputConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
public class MotorOutputConfigs extends Object implements ParentConfiguration
Configs that directly affect motor output.
Includes motor invert, neutral mode, and other features related to motor output.
-
Field Summary
Fields Modifier and Type Field Description double
DutyCycleNeutralDeadband
Configures the output deadband duty cycle during duty cycle and voltage based control modes.InvertedValue
Inverted
Invert state of the device.NeutralModeValue
NeutralMode
The state of the motor controller bridge when output is neutral or disabled.double
PeakForwardDutyCycle
Maximum (forward) output during duty cycle based control modes.double
PeakReverseDutyCycle
Minimum (reverse) output during duty cycle based control modes. -
Constructor Summary
Constructors Constructor Description MotorOutputConfigs()
-
Method Summary
Modifier and Type Method Description StatusCode
deserialize(String to_deserialize)
String
serialize()
String
toString()
MotorOutputConfigs
withDutyCycleNeutralDeadband(double newDutyCycleNeutralDeadband)
Modifies this configuration's DutyCycleNeutralDeadband parameter and returns itself for method-chaining and easier to use config API.MotorOutputConfigs
withInverted(InvertedValue newInverted)
Modifies this configuration's Inverted parameter and returns itself for method-chaining and easier to use config API.MotorOutputConfigs
withNeutralMode(NeutralModeValue newNeutralMode)
Modifies this configuration's NeutralMode parameter and returns itself for method-chaining and easier to use config API.MotorOutputConfigs
withPeakForwardDutyCycle(double newPeakForwardDutyCycle)
Modifies this configuration's PeakForwardDutyCycle parameter and returns itself for method-chaining and easier to use config API.MotorOutputConfigs
withPeakReverseDutyCycle(double newPeakReverseDutyCycle)
Modifies this configuration's PeakReverseDutyCycle parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
Inverted
Invert state of the device. -
NeutralMode
The state of the motor controller bridge when output is neutral or disabled. -
DutyCycleNeutralDeadband
Configures the output deadband duty cycle during duty cycle and voltage based control modes.- Minimum Value: 0.0
- Maximum Value: 0.25
- Default Value: 0
- Units: fractional
-
PeakForwardDutyCycle
Maximum (forward) output during duty cycle based control modes.- Minimum Value: -1.0
- Maximum Value: 1.0
- Default Value: 1
- Units: fractional
-
PeakReverseDutyCycle
Minimum (reverse) output during duty cycle based control modes.- Minimum Value: -1.0
- Maximum Value: 1.0
- Default Value: -1
- Units: fractional
-
-
Constructor Details
-
MotorOutputConfigs
public MotorOutputConfigs()
-
-
Method Details
-
withInverted
Modifies this configuration's Inverted parameter and returns itself for method-chaining and easier to use config API.Invert state of the device.
- Parameters:
newInverted
- Parameter to modify- Returns:
- Itself
-
withNeutralMode
Modifies this configuration's NeutralMode parameter and returns itself for method-chaining and easier to use config API.The state of the motor controller bridge when output is neutral or disabled.
- Parameters:
newNeutralMode
- Parameter to modify- Returns:
- Itself
-
withDutyCycleNeutralDeadband
Modifies this configuration's DutyCycleNeutralDeadband parameter and returns itself for method-chaining and easier to use config API.Configures the output deadband duty cycle during duty cycle and voltage based control modes.
- Minimum Value: 0.0
- Maximum Value: 0.25
- Default Value: 0
- Units: fractional
- Parameters:
newDutyCycleNeutralDeadband
- Parameter to modify- Returns:
- Itself
-
withPeakForwardDutyCycle
Modifies this configuration's PeakForwardDutyCycle parameter and returns itself for method-chaining and easier to use config API.Maximum (forward) output during duty cycle based control modes.
- Minimum Value: -1.0
- Maximum Value: 1.0
- Default Value: 1
- Units: fractional
- Parameters:
newPeakForwardDutyCycle
- Parameter to modify- Returns:
- Itself
-
withPeakReverseDutyCycle
Modifies this configuration's PeakReverseDutyCycle parameter and returns itself for method-chaining and easier to use config API.Minimum (reverse) output during duty cycle based control modes.
- Minimum Value: -1.0
- Maximum Value: 1.0
- Default Value: -1
- Units: fractional
- Parameters:
newPeakReverseDutyCycle
- Parameter to modify- Returns:
- Itself
-
toString
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-