stock mbed AnalogReads current loop closed and working

Dependencies:   mbed

Fork of priustroller_2 by N K

Revision:
37:09373294ff22
Parent:
36:11766b5da6ed
Child:
38:232c51b6853f
--- a/main.cpp	Thu Apr 16 04:08:47 2015 +0000
+++ b/main.cpp	Thu Apr 16 07:12:36 2015 +0000
@@ -11,12 +11,12 @@
     Context *context = new Context();
     context->ConfigureOutputs(D13, D3, D6, D2);
     context->ConfigureCurrentSensors(A1, A2, 0.01f, 0.7f);
-    context->ConfigureIdPidController(0.0008f, 0.0f, 0.0f, 1.0f, -1.0f);
-    context->ConfigureIqPidController(0.0008f, 0.0f, 0.0f, 1.0f, -1.0f);
+    context->ConfigureIdPidController(0.00001f, 0.0f, 0.0f, 1.0f, -1.0f);
+    context->ConfigureIqPidController(0.00001f, 0.0f, 0.0f, 1.0f, -1.0f);
     context->ConfigureThrottle(A0, 0.9f, 2.5f, 0.8f);  //last term is LPF strength
     context->ConfigurePositionSensor(A3, A4, 0.366f, 0.655f, 0.355f, 0.626f, 205.0f);
     context->ConfigureReference(80.0f);  // max phase current
-    context->ConfigureDebugger(1, 2000);
+    context->ConfigureDebugger(1, 4000);
     context->AttachCallBack(&fast, 5000);
     context->AttachCallBack(&slow, 10);
     context->AttachCallBack(&debug, 10);