ichinoseki_Bteam_2019 / PID

Dependents:   MR_example 2019_AR_Itsuki

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;