stock mbed AnalogReads current loop closed and working
Fork of priustroller_2 by
Diff: main.cpp
- Revision:
- 53:ef62d7a958f2
- Parent:
- 51:14112834b067
- Child:
- 54:e8d9bc885723
--- a/main.cpp Sun Apr 26 10:52:08 2015 +0000 +++ b/main.cpp Sat May 02 00:21:00 2015 +0000 @@ -11,12 +11,12 @@ Context *context = new Context(); context->ConfigureOutputs(D13, D3, D6, D2); context->ConfigureCurrentSensors(A1, A2, 0.0016f, 0.7f); //scale in V/A, filter strength - context->ConfigureIdPidController(0.0001f, 0.0f, 0.0f, 1.0f, -1.0f); - context->ConfigureIqPidController(0.0001f, 0.0f, 0.0f, 1.0f, -1.0f); - context->ConfigureThrottle(A0, 0.9f, 2.5f, 0.8f); //last term is LPF strength + context->ConfigureIdPidController(0.00005f, 0.0f, 0.0f, 1.0f, -1.0f); + context->ConfigureIqPidController(0.00005f, 0.0f, 0.0f, 1.0f, -1.0f); + context->ConfigureThrottle(A0, 0.9f, 2.5f, 0.99f); //last term is LPF strength context->ConfigurePositionSensor(A3, A4, 0.366f, 0.655f, 0.355f, 0.626f, 205.0f); - context->ConfigureReference(200.0f); // max phase current - context->ConfigureDebugger(1, 2000); + context->ConfigureReference(300.0f); // max phase current + context->ConfigureDebugger(4, 2000); context->AttachCallBack(&fast, 5000); context->AttachCallBack(&slow, 10); context->AttachCallBack(&debug, 10);