Catch the GIANT Caplico! / Mbed 2 deprecated PID_AutoTuning

Dependencies:   EC mbed

Fork of PID by Catch the GIANT Caplico!

Revision:
6:cfd12ff3f3ab
Parent:
5:97c1b79316c0
--- a/main.cpp	Wed Jul 25 04:04:15 2018 +0000
+++ b/main.cpp	Wed Aug 01 07:00:39 2018 +0000
@@ -53,13 +53,14 @@
         timer.reset();
         i=0;
         while(i<evaluation_count && timer.read()<evaluation_time) {
-            if(omega_old == 0 && Ec1.getOmega() == 0) {/*timer.reset();*/}
-            else if(omega_old * Ec1.getOmega() <= 0) i++;
+            if(omega_old == 0 && Ec1.getOmega() == 0) {
+                /*timer.reset();*/
+            } else if(omega_old * Ec1.getOmega() <= 0) i++;
             omega_old = Ec1.getOmega();
             out((10*(j%2) - Ec1.getCount()*(-1)*30*5/6*3.14159265359/2048) * (K + j*stride));
         }
         if(i==evaluation_count) break;
-        //pc.printf("%d periods\r\n");
+        pc.printf("%d periods TimeOut\r\n",i);
         j++;
     }
     out(0);