From d7c9b20f66d9655e4d242282d4820c5e123eb9f4 Mon Sep 17 00:00:00 2001 From: David Forrest Date: Fri, 3 Mar 2023 09:49:40 -0500 Subject: [PATCH] Expose integral to enable user-space hacking --- PID_v1.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PID_v1.h b/PID_v1.h index 9cba046..8734108 100644 --- a/PID_v1.h +++ b/PID_v1.h @@ -52,6 +52,8 @@ class PID // the PID calculation is performed. default is 100 + void Initialize(); // * bumpless update of internal variables. + double outputSum; // * internal integrator state for understanding and user-space control //Display functions **************************************************************** double GetKp(); // These functions query the pid for interal values. @@ -61,7 +63,6 @@ class PID int GetDirection(); // private: - void Initialize(); double dispKp; // * we'll hold on to the tuning parameters in user-entered double dispKi; // format for display purposes @@ -80,7 +81,7 @@ class PID // what these values are. with pointers we'll just know. unsigned long lastTime; - double outputSum, lastInput; + double lastInput; unsigned long SampleTime; double outMin, outMax;