|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
Lightweight PID controller used by characterization helpers. More...
#include <extras.hpp>
Public Member Functions | |
| LightPID (float kP, float kI, float kD) | |
| Construct with gains. | |
| float | update (float error) |
| Advance one step. | |
| void | reset () |
| Zero out the integral and previous-error history. | |
Public Attributes | |
| float | kP |
| float | kI |
| float | kD |
| Gains. | |
| float | prevError = 0 |
| Previous-cycle error. | |
| float | integral = 0 |
| Accumulated integral term. | |
| float | integralCap = 1000.0f |
| Anti-windup clamp (set 0 to disable). | |
Lightweight PID controller used by characterization helpers.
Distinct from light::PID — no exit conditions, no telemetry, just kP/kI/kD with an integral cap.
Definition at line 95 of file extras.hpp.
|
inline |
Construct with gains.
Definition at line 102 of file extras.hpp.
|
inline |
Zero out the integral and previous-error history.
Definition at line 123 of file extras.hpp.
|
inline |
Advance one step.
| error | current error |
Definition at line 111 of file extras.hpp.
| float LightPID::integral = 0 |
Accumulated integral term.
Definition at line 98 of file extras.hpp.
| float LightPID::integralCap = 1000.0f |
Anti-windup clamp (set 0 to disable).
Definition at line 99 of file extras.hpp.
| float LightPID::kD |
Gains.
Definition at line 96 of file extras.hpp.
| float LightPID::kI |
Definition at line 96 of file extras.hpp.
| float LightPID::kP |
Definition at line 96 of file extras.hpp.
| float LightPID::prevError = 0 |
Previous-cycle error.
Definition at line 97 of file extras.hpp.