David Pasztor / Mbed 2 deprecated Motor_control

Dependencies:   mbed-rtos mbed

Revision:
18:12598db37e38
Parent:
16:d4948633c559
Parent:
15:b6025338e0eb
Child:
20:c3bdb8f73c02
diff -r d4948633c559 -r 12598db37e38 main.cpp
--- a/main.cpp	Tue Mar 14 22:14:41 2017 +0000
+++ b/main.cpp	Tue Mar 14 22:22:55 2017 +0000
@@ -2,6 +2,7 @@
 #include "rtos.h"
 #include "definitions.h"
 #include "motorControl.h"
+#include "parser.h"
 
 #define kp 0.75f
 #define ki 0.5f
@@ -87,7 +88,7 @@
     
     dt_I3.start();                      //Start the time counters for velocity
         
-    //controlTicker.attach(&control, dt);
+    controlTicker.attach(&control, dt);
     
     I1.rise(&i_edge);                   //Assign interrupt handlers for LEDs
     I1.fall(&i_edge);
@@ -105,6 +106,7 @@
     motorOut((state-orState+lead+6)%6, 1.0f);            //Kickstart the motor
     
     while (count_i3 <= goalRevs) {
+
         pc.printf("Speed: %f, duty cycle: %f, revs done: %d \n\r",w3, duty, count_i3);
         /*
         if(duty < 0.00f) {