Table of Contents

Class VoltageConfigs

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

Configs that affect Voltage control types.

Includes peak output voltages and other configs affecting voltage measurements.
public class VoltageConfigs : IParentConfiguration, ISerializable, ICloneable
Inheritance
VoltageConfigs
Implements
Inherited Members

Fields

PeakForwardVoltage

Maximum (forward) output during voltage based control modes.

  • Minimum Value-32
  • Maximum Value32
  • Default Value16
  • UnitsV
public double PeakForwardVoltage

Field Value

double

PeakReverseVoltage

Minimum (reverse) output during voltage based control modes.

  • Minimum Value-32
  • Maximum Value32
  • Default Value-16
  • UnitsV
public double PeakReverseVoltage

Field Value

double

SupplyVoltageTimeConstant

The time constant (in seconds) of the low-pass filter for the supply voltage.

This impacts the filtering for the reported supply voltage, and any control strategies that use the supply voltage (such as voltage control on a motor controller).
  • Minimum Value0.0
  • Maximum Value0.1
  • Default Value0
  • Unitsseconds
public double SupplyVoltageTimeConstant

Field Value

double

Methods

Clone()

Creates a copy of this config group.

public VoltageConfigs Clone()

Returns

VoltageConfigs

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

WithPeakForwardVoltage(double)

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

Maximum (forward) output during voltage based control modes.
  • Minimum Value-32
  • Maximum Value32
  • Default Value16
  • UnitsV
public VoltageConfigs WithPeakForwardVoltage(double newPeakForwardVoltage)

Parameters

newPeakForwardVoltage double

Parameter to modify

Returns

VoltageConfigs

Itself

WithPeakReverseVoltage(double)

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

Minimum (reverse) output during voltage based control modes.
  • Minimum Value-32
  • Maximum Value32
  • Default Value-16
  • UnitsV
public VoltageConfigs WithPeakReverseVoltage(double newPeakReverseVoltage)

Parameters

newPeakReverseVoltage double

Parameter to modify

Returns

VoltageConfigs

Itself

WithSupplyVoltageTimeConstant(double)

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

The time constant (in seconds) of the low-pass filter for the supply voltage.

This impacts the filtering for the reported supply voltage, and any control strategies that use the supply voltage (such as voltage control on a motor controller).
  • Minimum Value0.0
  • Maximum Value0.1
  • Default Value0
  • Unitsseconds
public VoltageConfigs WithSupplyVoltageTimeConstant(double newSupplyVoltageTimeConstant)

Parameters

newSupplyVoltageTimeConstant double

Parameter to modify

Returns

VoltageConfigs

Itself