robot

Dependencies:   Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed

Fork of Robot2false by BMT M9 Groep01

Revision:
13:722697791695
Parent:
12:e59b2bdb8d0e
Child:
14:1ff917c6ac45
--- a/main.cpp	Fri Oct 31 08:38:05 2014 +0000
+++ b/main.cpp	Fri Oct 31 08:43:28 2014 +0000
@@ -402,11 +402,11 @@
     float           out_p = 0;
     static float    out_i = 0;
     float           out_d = 0;
-    //if(reset==true)
-    //{
-    //    out_i = 0;
-    //    prev_error = 0;
-    //}
+    if(reset==true)
+    {
+        out_i = 0;
+        prev_error = 0;
+    }
     error  = setspeed-measurement;
     out_p  = error*K_P;
     out_i += error*K_I;