ichinoseki_Bteam_2019 / PID

Dependents:   MR_example 2019_AR_Itsuki

Revision:
6:925e92d4d4e8
Parent:
5:ceb7cbed26f3
diff -r ceb7cbed26f3 -r 925e92d4d4e8 PID_VEL.cpp
--- a/PID_VEL.cpp	Tue Jul 16 15:13:18 2019 +0000
+++ b/PID_VEL.cpp	Sat Jul 20 13:26:09 2019 +0000
@@ -50,7 +50,7 @@
     else if(_output < 0)
         _output = 0;
     if(*sensor == 0 && *target == 0)
-        _output = 0;
+        _output = integral = 0;
     output = _output;
     
     if(abs(error) <= allowable_error)