CTRE Phoenix 6 C++ 25.0.0-beta-4
|
Configs that affect the closed-loop control of this motor controller. More...
#include <ctre/phoenix6/configs/Configs.hpp>
Public Member Functions | |
constexpr | ClosedLoopRampsConfigs ()=default |
constexpr ClosedLoopRampsConfigs & | WithDutyCycleClosedLoopRampPeriod (units::time::second_t newDutyCycleClosedLoopRampPeriod) |
Modifies this configuration's DutyCycleClosedLoopRampPeriod parameter and returns itself for method-chaining and easier to use config API. | |
constexpr ClosedLoopRampsConfigs & | WithVoltageClosedLoopRampPeriod (units::time::second_t newVoltageClosedLoopRampPeriod) |
Modifies this configuration's VoltageClosedLoopRampPeriod parameter and returns itself for method-chaining and easier to use config API. | |
constexpr ClosedLoopRampsConfigs & | WithTorqueClosedLoopRampPeriod (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. | |
Configs that affect the closed-loop control of this motor controller.
Closed-loop ramp rates for the various control types.
|
constexprdefault |
|
inlineoverridevirtual |
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlineoverridevirtual |
Implements ctre::phoenix6::ISerializable.
|
inlineoverridevirtual |
Implements ctre::phoenix6::configs::ParentConfiguration.
|
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.
newDutyCycleClosedLoopRampPeriod | Parameter to modify |
|
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.
newTorqueClosedLoopRampPeriod | Parameter to modify |
|
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.
newVoltageClosedLoopRampPeriod | Parameter to modify |
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.
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.
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.