N K
/
GaNtroller
a fork of priustroller
Fork of priustroller_current by
Diff: main.cpp
- Revision:
- 42:e4f35ff78d91
- Parent:
- 38:232c51b6853f
- Child:
- 46:bd39f7e6e37f
--- a/main.cpp Thu Apr 16 22:24:37 2015 +0000 +++ b/main.cpp Thu Apr 16 22:55:21 2015 +0000 @@ -8,7 +8,7 @@ #include "callbacks.h" int main() { - Context *context = new Context(); + Context *context = new Context(false); context->ConfigureOutputs(D13, D3, D6, D2); context->ConfigureCurrentSensors(A1, A2, 0.01f, 0.7f); context->ConfigureIdPidController(0.00001f, 0.0f, 0.0f, 1.0f, -1.0f); @@ -16,11 +16,16 @@ 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(2, 4000); - //context->AttachCallBack(&fast, 5000); + //context->ConfigureDebugger(2, 4000); + for (;;) { + fast_test2(context); + } + /* + context->AttachCallBack(&fast, 5000); context->AttachCallBack(&fast_test, 5000); context->AttachCallBack(&slow, 20); context->AttachCallBack(&debug, 10); context->AttachCallBack(&log, 500); context->Start(); + */ }