Skip to content

Commit 6ea5568

Browse files
author
David Forrest
committed
Expose integral to enable user-space hacking
1 parent 17f89a8 commit 6ea5568

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PID_v1_bc.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class PID
5252
// the PID calculation is performed. default is 100
5353

5454

55+
void Initialize(); // * bumpless update of internal variables.
56+
double outputSum; // * internal integrator state for understanding and user-space control
57+
5558
//Display functions ****************************************************************
5659
double GetKp(); // These functions query the pid for interal values.
5760
double GetKi(); // they were created mainly for the pid front-end,
@@ -62,7 +65,6 @@ class PID
6265
double GetTd();
6366

6467
private:
65-
void Initialize();
6668

6769
double dispKp; // * we'll hold on to the tuning parameters in user-entered
6870
double dispKi; // format for display purposes
@@ -80,7 +82,7 @@ class PID
8082
// what these values are. with pointers we'll just know.
8183

8284
unsigned long lastTime;
83-
double outputSum, lastInput;
85+
double lastInput;
8486

8587
unsigned long SampleTime;
8688
double outMin, outMax;

0 commit comments

Comments
 (0)