#include <SmartMotionConfig.h>
Inherits rev::spark::BaseConfig.
◆ SmartMotionConfig() [1/3]
rev::spark::SmartMotionConfig::SmartMotionConfig |
( |
| ) |
|
|
default |
◆ ~SmartMotionConfig()
rev::spark::SmartMotionConfig::~SmartMotionConfig |
( |
| ) |
|
|
overridedefault |
◆ SmartMotionConfig() [2/3]
◆ SmartMotionConfig() [3/3]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Apply()
Applies settings from another SmartMotionConfig to this one.
Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.
- Parameters
-
- Returns
- The updated SmartMotionConfig for method chaining
◆ MaxVelocity()
Set the maximum velocity for the Smart Motion mode of the controller. This is the cruising velocity of the profile. Natively, the units are in RPM but will be affected by the velocity conversion factor.
This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use SmartMotionConfig::MaxVelocity(double, ClosedLoopSlot).
- Parameters
-
maxVelocity | The maximum velocity with the velocity conversion factor applied |
slot | The closed loop slot to set the values for |
- Returns
- The modified SmartMotionConfig object for method chaining
- Deprecated:
- It is recommended to migrate to MAXMotion instead.
◆ MaxAcceleration()
Set the maximum acceleration for the Smart Motion mode of the controller for a specific PID slot. This is the rate at which the velocity will increase until the max velocity is reached. Natively, the units are in RPM per second but will be affected by the velocity conversion factor.
- Parameters
-
maxAcceleration | The maximum acceleration with the velocity conversion factor applied |
slot | The closed loop slot to set the values for |
- Returns
- The modified SmartMotionConfig object for method chaining
- Deprecated:
- It is recommended to migrate to MAXMotion instead.
◆ MinOutputVelocity()
Set the minimum velocity for the Smart Motion mode of the controller for a specific closed loop slot. Any requested velocities below this value will be set to 0. Natively, the units are in RPM but will be affected by the velocity conversion factor.
- Parameters
-
minVelocity | The minimum velocity with the velocity conversion factor applied |
slot | The closed loop slot to set the values for |
- Returns
- The modified SmartMotionConfig object for method chaining
- Deprecated:
- It is recommended to migrate to MAXMotion instead.
◆ AllowedClosedLoopError()
Set the allowed closed loop error for the Smart Motion mode of the controller for a specific closed loop slot. This value is how much deviation from the setpoint is tolerated and is useful in preventing oscillation around the setpoint. Natively, the units are in rotations but will be affected by the position conversion factor.
- Parameters
-
allowedError | The allowed error with the position conversion factor applied |
slot | The closed loop slot to set the values for |
- Returns
- The modified SmartMotionConfig object for method chaining
- Deprecated:
- It is recommended to migrate to MAXMotion instead.
The documentation for this class was generated from the following files: