diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-05-19 14:46:06 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-05-19 14:47:10 +0200 |
commit | 473ab3fd794d0baddd9a6a29ab25cea3d2217fc8 (patch) | |
tree | 49757353b5c4b8eb4b7aac88e1707812cb06a244 /zumo/pid.h | |
parent | ee6c95b743c8f750aa196711fb4a13a065554c4e (diff) |
pid tuned
Diffstat (limited to 'zumo/pid.h')
-rw-r--r-- | zumo/pid.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4,10 +4,11 @@ class PID { private: - float A0, A1, A2; - float error[3] = {0}; - float dt = 0.010; - float output = 0; + float A0, A1, A0d, A1d, A2d, tau, alpha, d0, d1, fd0, fd1; + float error[3]; + float output; + const float dt = 1.0; + const float N = 10.0; public: PID(float P, float I, float D); |