#include <SparkClosedLoopController.h>
◆ ArbFFUnits
Units for arbitrary feed-forward
Enumerator |
---|
kVoltage | |
kPercentOut | |
◆ SparkClosedLoopController() [1/2]
◆ SparkClosedLoopController() [2/2]
◆ ~SparkClosedLoopController()
rev::spark::SparkClosedLoopController::~SparkClosedLoopController |
( |
| ) |
|
|
default |
◆ operator=()
◆ SetReference()
Set the controller reference value based on the selected control mode.
- Parameters
-
value | The value to set depending on the control mode. For basic duty cycle control this should be a value between -1 and 1 Otherwise: Voltage Control: Voltage (volts) Velocity Control: Velocity (RPM) Position Control: Position (Rotations) Current Control: Current (Amps). The units can be changed for position and velocity by a scale factor using setPositionConversionFactor(). |
ctrl | Is the control type |
pidSlot | for this command |
arbFeedforward | A value from -32.0 to 32.0 which is a voltage applied to the motor after the result of the specified control mode. The units for the parameter is Volts. This value is set after the control mode, but before any current limits or ramp rates. |
arbFFUnits | the units for arbitrary feed-forward |
- Returns
- REVLibError::kOk if successful
◆ SetIAccum()
Set the I accumulator of the closed loop controller. This is useful when wishing to force a reset on the I accumulator of the Closed Loop Controller. You can also preset values to see how it will respond to certain I characteristics
To use this function, the controller must be in a closed loop control mode by calling setReference()
- Parameters
-
iAccum | The value to set the I accumulator to |
- Returns
- REVLibError::kOk if successful
◆ GetIAccum()
double SparkClosedLoopController::GetIAccum |
( |
| ) |
const |
Get the I accumulator of the closed loop controller. This is useful when wishing to see what the I accumulator value is to help with PID tuning
- Returns
- The value of the I accumulator
◆ SparkBase
The documentation for this class was generated from the following files: