stock mbed AnalogReads current loop closed and working

Dependencies:   mbed

Fork of priustroller_2 by N K

Revision:
39:6f3d08745cd9
Parent:
38:232c51b6853f
Child:
40:b2bd9a097e3f
Child:
42:e4f35ff78d91
--- a/callbacks.cpp	Thu Apr 16 21:57:38 2015 +0000
+++ b/callbacks.cpp	Thu Apr 16 22:24:37 2015 +0000
@@ -62,9 +62,9 @@
     angle240 = angle -120.0f;
     if (angle120 >= 360.0f) angle240 -= 360.0f;
     if (angle120 < 0.0f) angle240 += 360.0f;
-    c->inverter->SetDtcA(0.5f + 0.5f * FastSin(angle));
-    c->inverter->SetDtcB(0.5f + 0.5f * FastSin(angle120));
-    c->inverter->SetDtcC(0.5f + 0.5f * FastSin(angle240));
+    c->inverter->SetDtcA(0.5f + 0.5f * FastSin(angle) * c->user->throttle);
+    c->inverter->SetDtcB(0.5f + 0.5f * FastSin(angle120) * c->user->throttle);
+    c->inverter->SetDtcC(0.5f + 0.5f * FastSin(angle240) * c->user->throttle);
 }
 
 void slow(Context *c) {