Table of Contents

Class MotorOutputConfigs

Namespace
CTRE.Phoenix6.Configs
Assembly
Phoenix6.Hardware.dll

Configs that directly affect motor output.

Includes motor invert, neutral mode, and other features related to motor output.
public class MotorOutputConfigs : IParentConfiguration, ISerializable, ICloneable
Inheritance
MotorOutputConfigs
Implements
Inherited Members

Fields

ControlTimesyncFreqHz

When a control request UseTimesync is enabled, this determines the time-sychronized frequency at which control requests are applied.

The application of the control request will be delayed until the next timesync boundary at the frequency defined by this config. When set to 0 Hz, timesync will never be used for control requests, regardless of the value of UseTimesync.
  • Minimum Value50
  • Maximum Value500
  • Default Value0
  • UnitsHz
public double ControlTimesyncFreqHz

Field Value

double

DutyCycleNeutralDeadband

Configures the output deadband duty cycle during duty cycle and voltage based control modes.

  • Minimum Value0.0
  • Maximum Value0.25
  • Default Value0
  • Unitsfractional
public double DutyCycleNeutralDeadband

Field Value

double

Inverted

Invert state of the device as seen from the front of the motor.

public InvertedValue Inverted

Field Value

InvertedValue

NeutralMode

The state of the motor controller bridge when output is neutral or disabled.

public NeutralModeValue NeutralMode

Field Value

NeutralModeValue

PeakForwardDutyCycle

Maximum (forward) output during duty cycle based control modes.

  • Minimum Value-1.0
  • Maximum Value1.0
  • Default Value1
  • Unitsfractional
public double PeakForwardDutyCycle

Field Value

double

PeakReverseDutyCycle

Minimum (reverse) output during duty cycle based control modes.

  • Minimum Value-1.0
  • Maximum Value1.0
  • Default Value-1
  • Unitsfractional
public double PeakReverseDutyCycle

Field Value

double

Methods

Clone()

Creates a copy of this config group.

public MotorOutputConfigs Clone()

Returns

MotorOutputConfigs

Deserialize(string)

Deserialize string and put values into this object

public StatusCode Deserialize(string to_deserialize)

Parameters

to_deserialize string

String to deserialize

Returns

StatusCode

OK if deserialization is OK

Serialize()

Serialize this object into a string

public string Serialize()

Returns

string

This object's data serialized into a string

ToString()

Provides the string representation of this object

public override string ToString()

Returns

string

WithControlTimesyncFreqHz(double)

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

When a control request UseTimesync is enabled, this determines the time-sychronized frequency at which control requests are applied.

The application of the control request will be delayed until the next timesync boundary at the frequency defined by this config. When set to 0 Hz, timesync will never be used for control requests, regardless of the value of UseTimesync.
  • Minimum Value50
  • Maximum Value500
  • Default Value0
  • UnitsHz
public MotorOutputConfigs WithControlTimesyncFreqHz(double newControlTimesyncFreqHz)

Parameters

newControlTimesyncFreqHz double

Parameter to modify

Returns

MotorOutputConfigs

Itself

WithDutyCycleNeutralDeadband(double)

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 Value0.0
  • Maximum Value0.25
  • Default Value0
  • Unitsfractional
public MotorOutputConfigs WithDutyCycleNeutralDeadband(double newDutyCycleNeutralDeadband)

Parameters

newDutyCycleNeutralDeadband double

Parameter to modify

Returns

MotorOutputConfigs

Itself

WithInverted(InvertedValue)

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

Invert state of the device as seen from the front of the motor.
public MotorOutputConfigs WithInverted(InvertedValue newInverted)

Parameters

newInverted InvertedValue

Parameter to modify

Returns

MotorOutputConfigs

Itself

WithNeutralMode(NeutralModeValue)

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.
public MotorOutputConfigs WithNeutralMode(NeutralModeValue newNeutralMode)

Parameters

newNeutralMode NeutralModeValue

Parameter to modify

Returns

MotorOutputConfigs

Itself

WithPeakForwardDutyCycle(double)

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 Value1.0
  • Default Value1
  • Unitsfractional
public MotorOutputConfigs WithPeakForwardDutyCycle(double newPeakForwardDutyCycle)

Parameters

newPeakForwardDutyCycle double

Parameter to modify

Returns

MotorOutputConfigs

Itself

WithPeakReverseDutyCycle(double)

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 Value1.0
  • Default Value-1
  • Unitsfractional
public MotorOutputConfigs WithPeakReverseDutyCycle(double newPeakReverseDutyCycle)

Parameters

newPeakReverseDutyCycle double

Parameter to modify

Returns

MotorOutputConfigs

Itself