![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
TRR2018 omar
Fork of biniou by
main.cpp
- Committer:
- GaspardD
- Date:
- 2018-09-18
- Revision:
- 29:fc984fe08ca7
- Parent:
- 27:f8c3f1524a64
- Child:
- 33:88d8f254c0b7
File content as of revision 29:fc984fe08ca7:
#include "stateMachines.h" Timer timerLoop; #if DEBUG >= -1 InterruptIn dump_button(USER_BUTTON); #endif int main() { #if DEBUG >= -1 dump_button.fall(&pressed); initSamples(); #endif initIntegrationTable(); mursInit(); #ifdef DLVV obstacleInit(); #endif sectionInit(); maxSpeedInit(); throttleInit(); timerLoop.start(); while (1) { if(timerLoop.read_us()>20000) { // output every 20 ms timerLoop.reset(); timerLoop.start(); mursUpdate(); #ifdef DLVV obstacleUpdate(); #endif sectionUpdate(); maxSpeedUpdate(); throttleUpdate(); mursOutput(); #ifdef DLVV obstacleOutput(); #endif sectionOutput(); maxSpeedOutput(); throttleOutput(); } #ifdef SAMPLING sampleLog(); #endif } }