|
HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
|
A scheduler that interpolates and selects PID gains based on the current error. More...
#include <gain_scheduler.h>
Public Member Functions | |
| void | addStep (float threshold, float kP, float kI, float kD, float slew=0.0f) |
| Add a scheduling step. | |
| PIDGains | getGains (float error) const |
| Compute the correct gains based on the current error distance. | |
| void | clear () |
| Clears the current schedules. | |
A scheduler that interpolates and selects PID gains based on the current error.
Definition at line 19 of file gain_scheduler.h.
| void GainScheduler::addStep | ( | float | threshold, |
| float | kP, | ||
| float | kI, | ||
| float | kD, | ||
| float | slew = 0.0f |
||
| ) |
Add a scheduling step.
| threshold | Max error for this step. |
| kP | Proportional gain. |
| kI | Integral gain. |
| kD | Derivative gain. |
| slew | Slew rate. |
| PIDGains GainScheduler::getGains | ( | float | error | ) | const |
Compute the correct gains based on the current error distance.
| error | The current positional or rotational error. |
| void GainScheduler::clear | ( | ) |
Clears the current schedules.