|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Closed-loop control law (DETWS_ENABLE_CONTROL) - a zero-heap PID controller plus a handful of inline control-law primitives, for driving an actuator toward a setpoint. More...
#include "ServerConfig.h"Go to the source code of this file.
Closed-loop control law (DETWS_ENABLE_CONTROL) - a zero-heap PID controller plus a handful of inline control-law primitives, for driving an actuator toward a setpoint.
The PID is the textbook parallel form with the corrections that matter on real hardware:
pid_update() is defined inline (below): the whole law folds into the caller with no function- call overhead, and on the ESP32 / ESP32-S3 the single-precision-float math maps to the FPU (single-cycle add/mul + madd.s fused multiply-add, never the soft-float double path). Put your control loop in IRAM if you need deterministic latency free of flash-cache stalls.
Pure float arithmetic - no heap, no <math.h>. Pair it with a plant it can command (a CiA 402 drive via services/cia402, a dshot ESC, a heater PWM) and a sensor it can read back.
Definition in file control.h.