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

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

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

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

Public Member Functions

constexpr ClosedLoopRampsConfigs ()=default
 
constexpr ClosedLoopRampsConfigsWithDutyCycleClosedLoopRampPeriod (units::time::second_t newDutyCycleClosedLoopRampPeriod)
 Modifies this configuration's DutyCycleClosedLoopRampPeriod parameter and returns itself for method-chaining and easier to use config API.
 
constexpr ClosedLoopRampsConfigsWithVoltageClosedLoopRampPeriod (units::time::second_t newVoltageClosedLoopRampPeriod)
 Modifies this configuration's VoltageClosedLoopRampPeriod parameter and returns itself for method-chaining and easier to use config API.
 
constexpr ClosedLoopRampsConfigsWithTorqueClosedLoopRampPeriod (units::time::second_t newTorqueClosedLoopRampPeriod)
 Modifies this configuration's TorqueClosedLoopRampPeriod 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 DutyCycleClosedLoopRampPeriod = 0_s
 If non-zero, this determines how much time to ramp from 0% output to 100% during the closed-loop DutyCycle control modes.
 
units::time::second_t VoltageClosedLoopRampPeriod = 0_s
 If non-zero, this determines how much time to ramp from 0V output to 12V during the closed-loop Voltage control modes.
 
units::time::second_t TorqueClosedLoopRampPeriod = 0_s
 If non-zero, this determines how much time to ramp from 0A output to 300A during the closed-loop TorqueCurrent control modes.
 

Detailed Description

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

Closed-loop ramp rates for the various control types.

Constructor & Destructor Documentation

◆ ClosedLoopRampsConfigs()

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

Member Function Documentation

◆ Deserialize()

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

◆ Serialize()

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

◆ ToString()

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

◆ WithDutyCycleClosedLoopRampPeriod()

constexpr ClosedLoopRampsConfigs & ctre::phoenix6::configs::ClosedLoopRampsConfigs::WithDutyCycleClosedLoopRampPeriod ( units::time::second_t newDutyCycleClosedLoopRampPeriod)
inlineconstexpr

Modifies this configuration's DutyCycleClosedLoopRampPeriod 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 closed-loop DutyCycle control modes.

If the goal is to limit acceleration, it is more useful to ramp the closed-loop setpoint instead of the output. This can be achieved using Motion Magic® controls.

The acceleration and current draw of the motor can also be better restricted using current limits instead of a ramp rate.

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

◆ WithTorqueClosedLoopRampPeriod()

constexpr ClosedLoopRampsConfigs & ctre::phoenix6::configs::ClosedLoopRampsConfigs::WithTorqueClosedLoopRampPeriod ( units::time::second_t newTorqueClosedLoopRampPeriod)
inlineconstexpr

Modifies this configuration's TorqueClosedLoopRampPeriod 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 closed-loop TorqueCurrent control modes.

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

If the goal is to limit acceleration or jerk, it is more useful to ramp the closed-loop setpoint instead of the output. This can be achieved using Motion Magic® controls.

The acceleration and current draw of the motor can also be better restricted using current limits instead of a ramp rate.

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

◆ WithVoltageClosedLoopRampPeriod()

constexpr ClosedLoopRampsConfigs & ctre::phoenix6::configs::ClosedLoopRampsConfigs::WithVoltageClosedLoopRampPeriod ( units::time::second_t newVoltageClosedLoopRampPeriod)
inlineconstexpr

Modifies this configuration's VoltageClosedLoopRampPeriod 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 closed-loop Voltage control modes.

If the goal is to limit acceleration, it is more useful to ramp the closed-loop setpoint instead of the output. This can be achieved using Motion Magic® controls.

The acceleration and current draw of the motor can also be better restricted using current limits instead of a ramp rate.

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

Member Data Documentation

◆ DutyCycleClosedLoopRampPeriod

units::time::second_t ctre::phoenix6::configs::ClosedLoopRampsConfigs::DutyCycleClosedLoopRampPeriod = 0_s

If non-zero, this determines how much time to ramp from 0% output to 100% during the closed-loop DutyCycle control modes.

If the goal is to limit acceleration, it is more useful to ramp the closed-loop setpoint instead of the output. This can be achieved using Motion Magic® controls.

The acceleration and current draw of the motor can also be better restricted using current limits instead of a ramp rate.

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

◆ TorqueClosedLoopRampPeriod

units::time::second_t ctre::phoenix6::configs::ClosedLoopRampsConfigs::TorqueClosedLoopRampPeriod = 0_s

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

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

If the goal is to limit acceleration or jerk, it is more useful to ramp the closed-loop setpoint instead of the output. This can be achieved using Motion Magic® controls.

The acceleration and current draw of the motor can also be better restricted using current limits instead of a ramp rate.

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

◆ VoltageClosedLoopRampPeriod

units::time::second_t ctre::phoenix6::configs::ClosedLoopRampsConfigs::VoltageClosedLoopRampPeriod = 0_s

If non-zero, this determines how much time to ramp from 0V output to 12V during the closed-loop Voltage control modes.

If the goal is to limit acceleration, it is more useful to ramp the closed-loop setpoint instead of the output. This can be achieved using Motion Magic® controls.

The acceleration and current draw of the motor can also 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: