Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MR_example 2019_AR_Itsuki
Diff: PID.cpp
- Revision:
- 5:ceb7cbed26f3
- Parent:
- 4:64ae90ccf8d8
- Child:
- 7:6823018ff785
--- a/PID.cpp Tue Sep 11 01:33:20 2018 +0000
+++ b/PID.cpp Tue Jul 16 15:13:18 2019 +0000
@@ -8,7 +8,6 @@
kp = p; ki = i; kd = d; delta_t = t;
abs_max_output = max;
integral = 0;
- pid_type = PID_LOCATE;
allowable_error = 0;
}
@@ -56,12 +55,7 @@
integral = _gurd(integral, abs_max_output);
- if(pid_type == PID_LOCATE)
- _output = proportion + integral + differential;
- else if(pid_type == PID_SPEED)
- _output += proportion + integral + differential;
- else _output = 0;
-
+ _output = proportion + integral + differential;
_output = _gurd(_output, abs_max_output);
output = _output;