Modified Motor Driver Firmware to include Flash + Thermal

Dependencies:   FastPWM3 mbed-dev-STM-lean

Revision:
3:6a0015d88d06
Parent:
2:8724412ad628
Child:
4:c023f7b6f462
diff -r 8724412ad628 -r 6a0015d88d06 main.cpp
--- a/main.cpp	Fri Feb 19 04:13:06 2016 +0000
+++ b/main.cpp	Wed Mar 09 04:00:48 2016 +0000
@@ -42,6 +42,12 @@
 void Loop(void){
     foc.Commutate();
     }
+
+void PrintStuff(void){
+    float velocity = encoder.GetMechVelocity();
+    float position = encoder.GetMechPosition();
+    printf("%f, %f;\n\r", position, velocity);
+    }
 /*
 void voltage_foc(void){
     theta = encoder.GetElecPosition() + offset;
@@ -56,10 +62,12 @@
     wait(1);
 
     testing.attach(&Loop, .0001);
-    //inverter.SetDTC(.2, .5, .97);
+    //testing.attach(&PrintStuff, .05);
+    //inverter.SetDTC(.1, 0, 0);
     //inverter.EnableInverter();
 
     while(1) {
-
+        //printf("%f\n\r", encoder.GetElecPosition());
+        //wait(.1);
     }
 }