Prius IPM controller

Dependencies:   mbed

Fork of analoghalls5_5 by N K

Revision:
24:f1ff9c7256b5
Parent:
11:dccbaa9274c5
Child:
25:0003b824dd7d
--- a/main.cpp	Mon Mar 09 08:28:22 2015 +0000
+++ b/main.cpp	Mon Mar 09 11:33:14 2015 +0000
@@ -11,11 +11,14 @@
     Context *context = new Context();
     context->ConfigureOutputs(D6, D13, D3, D8);
     context->ConfigureCurrentSensors(A1, A2, 0.01, 0.95);
-    context->ConfigurePidControllers(0.001f, 0.1f, 0.0f, 5.0f, -5.0f);
+    context->ConfigurePidControllers(0.01f, 0.0f, 0.0f, 1.0f, -1.0f);
     context->ConfigureThrottle(A0, 0.8f, 3.0f);
     context->ConfigurePositionSensor(A4, A5, 0.249f, 0.497f, 0.231f, 0.499f, 205.0f);
+    context->ConfigureReference(5.0f);
+    context->ConfigureDebugger(2, 1000);
     context->AttachCallBack(&fast, 5000);
     context->AttachCallBack(&slow, 10);
     context->AttachCallBack(&debug, 10);
+    context->AttachCallBack(&log, 500);
     context->Start();
 }