CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
ctre::phoenix6::configs::MotorOutputConfigs Class Reference

Configs that directly affect motor output. More...

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

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

Public Member Functions

constexpr MotorOutputConfigs ()=default
 
constexpr MotorOutputConfigsWithInverted (signals::InvertedValue newInverted)
 Modifies this configuration's Inverted parameter and returns itself for method-chaining and easier to use config API.
 
constexpr MotorOutputConfigsWithNeutralMode (signals::NeutralModeValue newNeutralMode)
 Modifies this configuration's NeutralMode parameter and returns itself for method-chaining and easier to use config API.
 
constexpr MotorOutputConfigsWithDutyCycleNeutralDeadband (units::dimensionless::scalar_t newDutyCycleNeutralDeadband)
 Modifies this configuration's DutyCycleNeutralDeadband parameter and returns itself for method-chaining and easier to use config API.
 
constexpr MotorOutputConfigsWithPeakForwardDutyCycle (units::dimensionless::scalar_t newPeakForwardDutyCycle)
 Modifies this configuration's PeakForwardDutyCycle parameter and returns itself for method-chaining and easier to use config API.
 
constexpr MotorOutputConfigsWithPeakReverseDutyCycle (units::dimensionless::scalar_t newPeakReverseDutyCycle)
 Modifies this configuration's PeakReverseDutyCycle parameter and returns itself for method-chaining and easier to use config API.
 
constexpr MotorOutputConfigsWithControlTimesyncFreqHz (units::frequency::hertz_t newControlTimesyncFreqHz)
 Modifies this configuration's ControlTimesyncFreqHz 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 Attributes

signals::InvertedValue Inverted = signals::InvertedValue::CounterClockwise_Positive
 Invert state of the device as seen from the front of the motor.
 
signals::NeutralModeValue NeutralMode = signals::NeutralModeValue::Coast
 The state of the motor controller bridge when output is neutral or disabled.
 
units::dimensionless::scalar_t DutyCycleNeutralDeadband = 0
 Configures the output deadband duty cycle during duty cycle and voltage based control modes.
 
units::dimensionless::scalar_t PeakForwardDutyCycle = 1
 Maximum (forward) output during duty cycle based control modes.
 
units::dimensionless::scalar_t PeakReverseDutyCycle = -1
 Minimum (reverse) output during duty cycle based control modes.
 
units::frequency::hertz_t ControlTimesyncFreqHz = 0_Hz
 When a control request UseTimesync is enabled, this determines the time-sychronized frequency at which control requests are applied.
 

Detailed Description

Configs that directly affect motor output.

Includes motor invert, neutral mode, and other features related to motor output.

Constructor & Destructor Documentation

◆ MotorOutputConfigs()

constexpr ctre::phoenix6::configs::MotorOutputConfigs::MotorOutputConfigs ( )
constexprdefault

Member Function Documentation

◆ Deserialize()

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

◆ Serialize()

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

◆ ToString()

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

◆ WithControlTimesyncFreqHz()

constexpr MotorOutputConfigs & ctre::phoenix6::configs::MotorOutputConfigs::WithControlTimesyncFreqHz ( units::frequency::hertz_t newControlTimesyncFreqHz)
inlineconstexpr

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

When a control request UseTimesync is enabled, this determines the time-sychronized frequency at which control requests are applied.

The application of the control request will be delayed until the next timesync boundary at the frequency defined by this config. When set to 0 Hz, timesync will never be used for control requests, regardless of the value of UseTimesync.

  • Minimum Value: 50
  • Maximum Value: 500
  • Default Value: 0
  • Units: Hz
Parameters
newControlTimesyncFreqHzParameter to modify
Returns
Itself

◆ WithDutyCycleNeutralDeadband()

constexpr MotorOutputConfigs & ctre::phoenix6::configs::MotorOutputConfigs::WithDutyCycleNeutralDeadband ( units::dimensionless::scalar_t newDutyCycleNeutralDeadband)
inlineconstexpr

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

Configures the output deadband duty cycle during duty cycle and voltage based control modes.

  • Minimum Value: 0.0
  • Maximum Value: 0.25
  • Default Value: 0
  • Units: fractional
Parameters
newDutyCycleNeutralDeadbandParameter to modify
Returns
Itself

◆ WithInverted()

constexpr MotorOutputConfigs & ctre::phoenix6::configs::MotorOutputConfigs::WithInverted ( signals::InvertedValue newInverted)
inlineconstexpr

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

Invert state of the device as seen from the front of the motor.

Parameters
newInvertedParameter to modify
Returns
Itself

◆ WithNeutralMode()

constexpr MotorOutputConfigs & ctre::phoenix6::configs::MotorOutputConfigs::WithNeutralMode ( signals::NeutralModeValue newNeutralMode)
inlineconstexpr

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

The state of the motor controller bridge when output is neutral or disabled.

Parameters
newNeutralModeParameter to modify
Returns
Itself

◆ WithPeakForwardDutyCycle()

constexpr MotorOutputConfigs & ctre::phoenix6::configs::MotorOutputConfigs::WithPeakForwardDutyCycle ( units::dimensionless::scalar_t newPeakForwardDutyCycle)
inlineconstexpr

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

Maximum (forward) output during duty cycle based control modes.

  • Minimum Value: -1.0
  • Maximum Value: 1.0
  • Default Value: 1
  • Units: fractional
Parameters
newPeakForwardDutyCycleParameter to modify
Returns
Itself

◆ WithPeakReverseDutyCycle()

constexpr MotorOutputConfigs & ctre::phoenix6::configs::MotorOutputConfigs::WithPeakReverseDutyCycle ( units::dimensionless::scalar_t newPeakReverseDutyCycle)
inlineconstexpr

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

Minimum (reverse) output during duty cycle based control modes.

  • Minimum Value: -1.0
  • Maximum Value: 1.0
  • Default Value: -1
  • Units: fractional
Parameters
newPeakReverseDutyCycleParameter to modify
Returns
Itself

Member Data Documentation

◆ ControlTimesyncFreqHz

units::frequency::hertz_t ctre::phoenix6::configs::MotorOutputConfigs::ControlTimesyncFreqHz = 0_Hz

When a control request UseTimesync is enabled, this determines the time-sychronized frequency at which control requests are applied.

The application of the control request will be delayed until the next timesync boundary at the frequency defined by this config. When set to 0 Hz, timesync will never be used for control requests, regardless of the value of UseTimesync.

  • Minimum Value: 50
  • Maximum Value: 500
  • Default Value: 0
  • Units: Hz

◆ DutyCycleNeutralDeadband

units::dimensionless::scalar_t ctre::phoenix6::configs::MotorOutputConfigs::DutyCycleNeutralDeadband = 0

Configures the output deadband duty cycle during duty cycle and voltage based control modes.

  • Minimum Value: 0.0
  • Maximum Value: 0.25
  • Default Value: 0
  • Units: fractional

◆ Inverted

signals::InvertedValue ctre::phoenix6::configs::MotorOutputConfigs::Inverted = signals::InvertedValue::CounterClockwise_Positive

Invert state of the device as seen from the front of the motor.

◆ NeutralMode

signals::NeutralModeValue ctre::phoenix6::configs::MotorOutputConfigs::NeutralMode = signals::NeutralModeValue::Coast

The state of the motor controller bridge when output is neutral or disabled.

◆ PeakForwardDutyCycle

units::dimensionless::scalar_t ctre::phoenix6::configs::MotorOutputConfigs::PeakForwardDutyCycle = 1

Maximum (forward) output during duty cycle based control modes.

  • Minimum Value: -1.0
  • Maximum Value: 1.0
  • Default Value: 1
  • Units: fractional

◆ PeakReverseDutyCycle

units::dimensionless::scalar_t ctre::phoenix6::configs::MotorOutputConfigs::PeakReverseDutyCycle = -1

Minimum (reverse) output during duty cycle based control modes.

  • Minimum Value: -1.0
  • Maximum Value: 1.0
  • Default Value: -1
  • Units: fractional

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