#include <MAXMotionConfig.h>
Inherits rev::spark::BaseConfig.
◆ MAXMotionPositionMode
Enumerator |
---|
kMAXMotionTrapezoidal | |
◆ MAXMotionConfig() [1/3]
rev::spark::MAXMotionConfig::MAXMotionConfig |
( |
| ) |
|
|
default |
◆ ~MAXMotionConfig()
rev::spark::MAXMotionConfig::~MAXMotionConfig |
( |
| ) |
|
|
overridedefault |
◆ MAXMotionConfig() [2/3]
◆ MAXMotionConfig() [3/3]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Apply()
Applies settings from another MAXMotionConfig 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 MAXMotionConfig for method chaining
◆ MaxVelocity()
Set the maximum velocity for the MAXMotion mode of the controller for a specific closed loop slot. This is the cruising velocity of the profile. Natively, the units are in RPM but will be affected by the velocity conversion factor.
- Parameters
-
maxVelocity | The maximum velocity with the velocity conversion factor applied |
slot | The closed loop slot to set the values for |
- Returns
- The modified MAXMotionConfig object for method chaining
◆ MaxAcceleration()
Set the maximum acceleration for the MAXMotion mode of the controller for a specific closed loop 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 MAXMotionConfig object for method chaining
◆ AllowedClosedLoopError()
Set the allowed closed loop error for the MAXMotion mode of the controller for a specific PID 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 MAXMotionConfig object for method chaining
◆ PositionMode()
Set the MAXMotion position control mode of the controller for a specific closed loop slot.
- Parameters
-
mode | The MAXmotion position mode |
slot | The closed loop slot to set the values for |
- Returns
- The modified MAXMotionConfig object for method chaining
The documentation for this class was generated from the following files: