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

Configs that affect the open-loop control of this motor controller. More...

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

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

Public Member Functions

constexpr OpenLoopRampsConfigs ()=default
 
constexpr OpenLoopRampsConfigsWithDutyCycleOpenLoopRampPeriod (units::time::second_t newDutyCycleOpenLoopRampPeriod)
 Modifies this configuration's DutyCycleOpenLoopRampPeriod parameter and returns itself for method-chaining and easier to use config API.
 
constexpr OpenLoopRampsConfigsWithVoltageOpenLoopRampPeriod (units::time::second_t newVoltageOpenLoopRampPeriod)
 Modifies this configuration's VoltageOpenLoopRampPeriod parameter and returns itself for method-chaining and easier to use config API.
 
constexpr OpenLoopRampsConfigsWithTorqueOpenLoopRampPeriod (units::time::second_t newTorqueOpenLoopRampPeriod)
 Modifies this configuration's TorqueOpenLoopRampPeriod 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

units::time::second_t DutyCycleOpenLoopRampPeriod = 0_s
 If non-zero, this determines how much time to ramp from 0% output to 100% during the open-loop DutyCycleOut control mode.
 
units::time::second_t VoltageOpenLoopRampPeriod = 0_s
 If non-zero, this determines how much time to ramp from 0V output to 12V during the open-loop VoltageOut control mode.
 
units::time::second_t TorqueOpenLoopRampPeriod = 0_s
 If non-zero, this determines how much time to ramp from 0A output to 300A during the open-loop TorqueCurrent control mode.
 

Detailed Description

Configs that affect the open-loop control of this motor controller.

Open-loop ramp rates for the various control types.

Constructor & Destructor Documentation

◆ OpenLoopRampsConfigs()

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

Member Function Documentation

◆ Deserialize()

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

◆ Serialize()

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

◆ ToString()

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

◆ WithDutyCycleOpenLoopRampPeriod()

constexpr OpenLoopRampsConfigs & ctre::phoenix6::configs::OpenLoopRampsConfigs::WithDutyCycleOpenLoopRampPeriod ( units::time::second_t newDutyCycleOpenLoopRampPeriod)
inlineconstexpr

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

If non-zero, this determines how much time to ramp from 0% output to 100% during the open-loop DutyCycleOut control mode.

This provides an easy way to limit the acceleration of the motor. However, the acceleration and current draw of the motor can be better restricted using current limits instead of a ramp rate.

  • Minimum Value: 0
  • Maximum Value: 1
  • Default Value: 0
  • Units: seconds
Parameters
newDutyCycleOpenLoopRampPeriodParameter to modify
Returns
Itself

◆ WithTorqueOpenLoopRampPeriod()

constexpr OpenLoopRampsConfigs & ctre::phoenix6::configs::OpenLoopRampsConfigs::WithTorqueOpenLoopRampPeriod ( units::time::second_t newTorqueOpenLoopRampPeriod)
inlineconstexpr

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

If non-zero, this determines how much time to ramp from 0A output to 300A during the open-loop TorqueCurrent control mode.

Since TorqueCurrent is directly proportional to acceleration, this ramp limits jerk instead of acceleration.

  • Minimum Value: 0
  • Maximum Value: 10
  • Default Value: 0
  • Units: seconds
Parameters
newTorqueOpenLoopRampPeriodParameter to modify
Returns
Itself

◆ WithVoltageOpenLoopRampPeriod()

constexpr OpenLoopRampsConfigs & ctre::phoenix6::configs::OpenLoopRampsConfigs::WithVoltageOpenLoopRampPeriod ( units::time::second_t newVoltageOpenLoopRampPeriod)
inlineconstexpr

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

If non-zero, this determines how much time to ramp from 0V output to 12V during the open-loop VoltageOut control mode.

This provides an easy way to limit the acceleration of the motor. However, the acceleration and current draw of the motor can be better restricted using current limits instead of a ramp rate.

  • Minimum Value: 0
  • Maximum Value: 1
  • Default Value: 0
  • Units: seconds
Parameters
newVoltageOpenLoopRampPeriodParameter to modify
Returns
Itself

Member Data Documentation

◆ DutyCycleOpenLoopRampPeriod

units::time::second_t ctre::phoenix6::configs::OpenLoopRampsConfigs::DutyCycleOpenLoopRampPeriod = 0_s

If non-zero, this determines how much time to ramp from 0% output to 100% during the open-loop DutyCycleOut control mode.

This provides an easy way to limit the acceleration of the motor. However, the acceleration and current draw of the motor can be better restricted using current limits instead of a ramp rate.

  • Minimum Value: 0
  • Maximum Value: 1
  • Default Value: 0
  • Units: seconds

◆ TorqueOpenLoopRampPeriod

units::time::second_t ctre::phoenix6::configs::OpenLoopRampsConfigs::TorqueOpenLoopRampPeriod = 0_s

If non-zero, this determines how much time to ramp from 0A output to 300A during the open-loop TorqueCurrent control mode.

Since TorqueCurrent is directly proportional to acceleration, this ramp limits jerk instead of acceleration.

  • Minimum Value: 0
  • Maximum Value: 10
  • Default Value: 0
  • Units: seconds

◆ VoltageOpenLoopRampPeriod

units::time::second_t ctre::phoenix6::configs::OpenLoopRampsConfigs::VoltageOpenLoopRampPeriod = 0_s

If non-zero, this determines how much time to ramp from 0V output to 12V during the open-loop VoltageOut control mode.

This provides an easy way to limit the acceleration of the motor. However, the acceleration and current draw of the motor can be better restricted using current limits instead of a ramp rate.

  • Minimum Value: 0
  • Maximum Value: 1
  • Default Value: 0
  • Units: seconds

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