CTRE Phoenix 6 C++ 24.3.0
ctre::phoenix6::configs::VoltageConfigs Class Reference

Configs that affect Voltage control types. More...

#include <ctre/phoenix6/configs/Configs.hpp>

Inheritance diagram for ctre::phoenix6::configs::VoltageConfigs:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

VoltageConfigsWithSupplyVoltageTimeConstant (double newSupplyVoltageTimeConstant)
 Modifies this configuration's SupplyVoltageTimeConstant parameter and returns itself for method-chaining and easier to use config API. More...
 
VoltageConfigsWithPeakForwardVoltage (double newPeakForwardVoltage)
 Modifies this configuration's PeakForwardVoltage parameter and returns itself for method-chaining and easier to use config API. More...
 
VoltageConfigsWithPeakReverseVoltage (double newPeakReverseVoltage)
 Modifies this configuration's PeakReverseVoltage parameter and returns itself for method-chaining and easier to use config API. More...
 
std::string ToString () const override
 
std::string Serialize () const override
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize) override
 
virtual std::string ToString () const =0
 
virtual ctre::phoenix::StatusCode Deserialize (const std::string &string)=0
 
virtual std::string Serialize () const =0
 

Public Attributes

double SupplyVoltageTimeConstant = 0
 The time constant (in seconds) of the low-pass filter for the supply voltage. More...
 
double PeakForwardVoltage = 16
 Maximum (forward) output during voltage based control modes. More...
 
double PeakReverseVoltage = -16
 Minimum (reverse) output during voltage based control modes. More...
 

Detailed Description

Configs that affect Voltage control types.

Includes peak output voltages and other configs affecting voltage measurements.

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::VoltageConfigs::Deserialize ( const std::string &  to_deserialize)
inlineoverridevirtual

◆ Serialize()

std::string ctre::phoenix6::configs::VoltageConfigs::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string ctre::phoenix6::configs::VoltageConfigs::ToString ( ) const
inlineoverridevirtual

◆ WithPeakForwardVoltage()

VoltageConfigs & ctre::phoenix6::configs::VoltageConfigs::WithPeakForwardVoltage ( double  newPeakForwardVoltage)
inline

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
newPeakForwardVoltageParameter to modify
Returns
Itself

◆ WithPeakReverseVoltage()

VoltageConfigs & ctre::phoenix6::configs::VoltageConfigs::WithPeakReverseVoltage ( double  newPeakReverseVoltage)
inline

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
newPeakReverseVoltageParameter to modify
Returns
Itself

◆ WithSupplyVoltageTimeConstant()

VoltageConfigs & ctre::phoenix6::configs::VoltageConfigs::WithSupplyVoltageTimeConstant ( double  newSupplyVoltageTimeConstant)
inline

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
newSupplyVoltageTimeConstantParameter to modify
Returns
Itself

Member Data Documentation

◆ PeakForwardVoltage

double ctre::phoenix6::configs::VoltageConfigs::PeakForwardVoltage = 16

Maximum (forward) output during voltage based control modes.

  • Minimum Value: -16
  • Maximum Value: 16
  • Default Value: 16
  • Units: V

◆ PeakReverseVoltage

double ctre::phoenix6::configs::VoltageConfigs::PeakReverseVoltage = -16

Minimum (reverse) output during voltage based control modes.

  • Minimum Value: -16
  • Maximum Value: 16
  • Default Value: -16
  • Units: V

◆ SupplyVoltageTimeConstant

double ctre::phoenix6::configs::VoltageConfigs::SupplyVoltageTimeConstant = 0

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

The documentation for this class was generated from the following file: