Class VoltageConfigs
- All Implemented Interfaces:
ParentConfiguration,ISerializable,Cloneable
Includes peak output voltages and other configs affecting voltage measurements.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleMaximum (forward) output during voltage based control modes.doubleMinimum (reverse) output during voltage based control modes.doubleThe time constant (in seconds) of the low-pass filter for the supply voltage. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final VoltageHelper method to get this configuration's PeakForwardVoltage parameter converted to a unit type.final VoltageHelper method to get this configuration's PeakReverseVoltage parameter converted to a unit type.final TimeHelper method to get this configuration's SupplyVoltageTimeConstant parameter converted to a unit type.final StringGet the serialized form of this configuration group.toString()final VoltageConfigswithPeakForwardVoltage(double newPeakForwardVoltage) Modifies this configuration's PeakForwardVoltage parameter and returns itself for method-chaining and easier to use config API.final VoltageConfigswithPeakForwardVoltage(Voltage newPeakForwardVoltage) Modifies this configuration's PeakForwardVoltage parameter and returns itself for method-chaining and easier to use config API.final VoltageConfigswithPeakReverseVoltage(double newPeakReverseVoltage) Modifies this configuration's PeakReverseVoltage parameter and returns itself for method-chaining and easier to use config API.final VoltageConfigswithPeakReverseVoltage(Voltage newPeakReverseVoltage) Modifies this configuration's PeakReverseVoltage parameter and returns itself for method-chaining and easier to use config API.final VoltageConfigswithSupplyVoltageTimeConstant(double newSupplyVoltageTimeConstant) Modifies this configuration's SupplyVoltageTimeConstant parameter and returns itself for method-chaining and easier to use config API.final VoltageConfigswithSupplyVoltageTimeConstant(Time newSupplyVoltageTimeConstant) Modifies this configuration's SupplyVoltageTimeConstant parameter and returns itself for method-chaining and easier to use config API.
-
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: seconds
-
PeakForwardVoltage
Maximum (forward) output during voltage based control modes.- Minimum Value: -32
- Maximum Value: 32
- Default Value: 16
- Units: V
-
PeakReverseVoltage
Minimum (reverse) output during voltage based control modes.- Minimum Value: -32
- Maximum Value: 32
- Default Value: -16
- Units: V
-
-
Constructor Details
-
VoltageConfigs
public VoltageConfigs()
-
-
Method Details
-
withSupplyVoltageTimeConstant
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: seconds
- Parameters:
newSupplyVoltageTimeConstant- Parameter to modify- Returns:
- Itself
-
withSupplyVoltageTimeConstant
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: seconds
- Parameters:
newSupplyVoltageTimeConstant- Parameter to modify- Returns:
- Itself
-
getSupplyVoltageTimeConstantMeasure
Helper method to get this configuration's SupplyVoltageTimeConstant parameter converted to a unit type. If not using the Java units library,SupplyVoltageTimeConstantcan be accessed directly instead.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: seconds
- Returns:
- SupplyVoltageTimeConstant
-
withPeakForwardVoltage
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 Value: 32
- Default Value: 16
- Units: V
- Parameters:
newPeakForwardVoltage- Parameter to modify- Returns:
- Itself
-
withPeakForwardVoltage
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 Value: 32
- Default Value: 16
- Units: V
- Parameters:
newPeakForwardVoltage- Parameter to modify- Returns:
- Itself
-
getPeakForwardVoltageMeasure
Helper method to get this configuration's PeakForwardVoltage parameter converted to a unit type. If not using the Java units library,PeakForwardVoltagecan be accessed directly instead.Maximum (forward) output during voltage based control modes.
- Minimum Value: -32
- Maximum Value: 32
- Default Value: 16
- Units: V
- Returns:
- PeakForwardVoltage
-
withPeakReverseVoltage
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 Value: 32
- Default Value: -16
- Units: V
- Parameters:
newPeakReverseVoltage- Parameter to modify- Returns:
- Itself
-
withPeakReverseVoltage
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 Value: 32
- Default Value: -16
- Units: V
- Parameters:
newPeakReverseVoltage- Parameter to modify- Returns:
- Itself
-
getPeakReverseVoltageMeasure
Helper method to get this configuration's PeakReverseVoltage parameter converted to a unit type. If not using the Java units library,PeakReverseVoltagecan be accessed directly instead.Minimum (reverse) output during voltage based control modes.
- Minimum Value: -32
- Maximum Value: 32
- Default Value: -16
- Units: V
- Returns:
- PeakReverseVoltage
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceISerializable- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Returns:
- Return code of the deserialize method
-
clone
-