David Pasztor / Mbed 2 deprecated Motor_control

Dependencies:   mbed-rtos mbed

Revision:
50:c0c299bf54a6
Parent:
49:731c95cd5852
Child:
53:c703e0bf5e87
Child:
56:389436192e63
--- a/photointerruptRoutines.h	Fri Mar 24 16:57:35 2017 +0000
+++ b/photointerruptRoutines.h	Fri Mar 24 17:30:41 2017 +0000
@@ -71,12 +71,13 @@
 
 void i_edge(){
     state = updateState();
-//    motorOut((state-orState+lead+6)%6, velocityDuty);
+    motorOut((state-orState+lead+6)%6, velocityDuty);
 }
 
 inline void i3rise(){
     state = updateState();
-    w3 = angle/dt_I3.read();                //Calc angular velocity    
+    motorOut((state-orState+lead+6)%6, velocityDuty);
+    w3 = 1/dt_I3.read();                //Calc angular velocity    
     dt_I3.reset();
  
     if (I2.read() == 1)                     //Only count revolutions if the