Loading [MathJax]/jax/output/HTML-CSS/config.js
CTRE Phoenix 6 C++ 25.4.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

constexpr VoltageConfigs ()=default
 
constexpr VoltageConfigsWithSupplyVoltageTimeConstant (units::time::second_t newSupplyVoltageTimeConstant)
 Modifies this configuration's SupplyVoltageTimeConstant parameter and returns itself for method-chaining and easier to use config API.
 
constexpr VoltageConfigsWithPeakForwardVoltage (units::voltage::volt_t newPeakForwardVoltage)
 Modifies this configuration's PeakForwardVoltage parameter and returns itself for method-chaining and easier to use config API.
 
constexpr VoltageConfigsWithPeakReverseVoltage (units::voltage::volt_t newPeakReverseVoltage)
 Modifies this configuration's PeakReverseVoltage parameter and returns itself for method-chaining and easier to use config API.
 
std::string ToString () const override
 
std::string Serialize () const override
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize) override
 
- Public Member Functions inherited from ctre::phoenix6::configs::ParentConfiguration
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

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

Detailed Description

Configs that affect Voltage control types.

Includes peak output voltages and other configs affecting voltage measurements.

Constructor & Destructor Documentation

◆ VoltageConfigs()

ctre::phoenix6::configs::VoltageConfigs::VoltageConfigs ( )
constexprdefault

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 ( units::voltage::volt_t newPeakForwardVoltage)
inlineconstexpr

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 ( units::voltage::volt_t newPeakReverseVoltage)
inlineconstexpr

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 ( units::time::second_t newSupplyVoltageTimeConstant)
inlineconstexpr

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

Member Data Documentation

◆ PeakForwardVoltage

units::voltage::volt_t ctre::phoenix6::configs::VoltageConfigs::PeakForwardVoltage = 16_V

Maximum (forward) output during voltage based control modes.

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

◆ PeakReverseVoltage

units::voltage::volt_t ctre::phoenix6::configs::VoltageConfigs::PeakReverseVoltage = -16_V

Minimum (reverse) output during voltage based control modes.

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

◆ SupplyVoltageTimeConstant

units::time::second_t ctre::phoenix6::configs::VoltageConfigs::SupplyVoltageTimeConstant = 0_s

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

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