Motor control for robots. More compact, less object-oriented revision.

Dependencies:   FastPWM3 mbed-dev-f303

Fork of Hobbyking_Cheetah_V1 by Ben Katz

Revision:
39:3580a907ef93
Parent:
38:67e4e1453a4b
Child:
40:cd7e837b2b93
--- a/main.cpp	Mon May 14 20:59:02 2018 +0000
+++ b/main.cpp	Mon May 14 21:01:06 2018 +0000
@@ -247,7 +247,6 @@
                 if(state_change){
                     enter_torque_mode();
                     count = 0;
-                    controller.t_ff = 15.0f;
                     }
                 else{
                 /*
@@ -271,11 +270,12 @@
                 commutate(&controller, &observer, &gpio, controller.theta_elec);           // Run current loop
                 controller.timeout += 1;
                 
+                /*
                 count++;
                 if(count == 40000){
-                     controller.t_ff = -controller.t_ff;
                      count = 0;
                      }
+                     */
                      
             
                 }