Class VoltageConfigs

java.lang.Object
com.ctre.phoenix6.configs.VoltageConfigs
All Implemented Interfaces:
ParentConfiguration, ISerializable

public class VoltageConfigs
extends Object
implements ParentConfiguration
Configs that affect Voltage control types.

Includes peak output voltages and other configs affecting voltage measurements.

  • Field Details

    • 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 Value: 0.0
      • Maximum Value: 0.1
      • Default Value: 0
      • Units: sec
    • PeakForwardVoltage

      public double PeakForwardVoltage
      Maximum (forward) output during voltage based control modes.
      • Minimum Value: -16
      • Maximum Value: 16
      • Default Value: 16
      • Units: V
    • PeakReverseVoltage

      public double PeakReverseVoltage
      Minimum (reverse) output during voltage based control modes.
      • Minimum Value: -16
      • Maximum Value: 16
      • Default Value: -16
      • Units: V
  • Constructor Details

  • Method Details

    • withSupplyVoltageTimeConstant

      public VoltageConfigs withSupplyVoltageTimeConstant​(double newSupplyVoltageTimeConstant)
      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 Value: 0.0
      • Maximum Value: 0.1
      • Default Value: 0
      • Units: sec
      Parameters:
      newSupplyVoltageTimeConstant - Parameter to modify
      Returns:
      Itself
    • withPeakForwardVoltage

      public VoltageConfigs withPeakForwardVoltage​(double newPeakForwardVoltage)
      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: -16
      • Maximum Value: 16
      • Default Value: 16
      • Units: V
      Parameters:
      newPeakForwardVoltage - Parameter to modify
      Returns:
      Itself
    • withPeakReverseVoltage

      public VoltageConfigs withPeakReverseVoltage​(double newPeakReverseVoltage)
      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: -16
      • Maximum Value: 16
      • Default Value: -16
      • Units: V
      Parameters:
      newPeakReverseVoltage - Parameter to modify
      Returns:
      Itself
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • deserialize

      public StatusCode deserialize​(String to_deserialize)
      Specified by:
      deserialize in interface ParentConfiguration
    • serialize

      public String serialize()
      Specified by:
      serialize in interface ISerializable