Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of priustroller_2 by
main.cpp
00001 #include "includes.h" 00002 #include "transforms.h" 00003 #include "filters.h" 00004 #include "context.h" 00005 #include "core.h" 00006 #include "meta.h" 00007 #include "sensors.h" 00008 #include "callbacks.h" 00009 00010 int main() { 00011 Context *context = new Context(); 00012 context->ConfigureOutputs(D13, D3, D6, D2); 00013 context->ConfigureCurrentSensors(A1, A2, 0.0016f, 0.7f); //scale in V/A, filter strength 00014 context->ConfigureIdPidController(0.0000012f, 0.0f, 0.0f, 1.0f, -1.0f); 00015 context->ConfigureIqPidController(0.0000012f, 0.0f, 0.0f, 1.0f, -1.0f); 00016 context->ConfigureThrottle(A0, 0.9f, 2.5f, 0.99f); //last term is LPF strength 00017 context->ConfigurePositionSensor(A3, A4, 0.366f, 0.655f, 0.355f, 0.626f, 260.0f); //205 is default 00018 context->ConfigureReference(300.0f); // max phase current 00019 context->ConfigureDebugger(4, 2000); 00020 context->AttachCallBack(&fast, 5000); 00021 context->AttachCallBack(&slow, 10); 00022 context->AttachCallBack(&debug, 10); 00023 context->AttachCallBack(&log, 500); 00024 context->Start(); 00025 }
Generated on Tue Jul 12 2022 18:31:15 by
1.7.2
