TRR2018 omar

Dependencies:   mbed

Fork of biniou by TRR 2018

main.cpp

Committer:
GaspardD
Date:
2018-09-16
Revision:
23:04d393220daa
Parent:
11:bc24b3ba51a9
Child:
27:f8c3f1524a64

File content as of revision 23:04d393220daa:

#include "stateMachines.h"
Timer timerLoop;

int main()
{
    mursInit();
#ifdef DLVV
    obstacleInit();
#endif
    sectionInit();
    maxSpeedInit();
    throttleInit();
    timerLoop.start();
    while (1) {

        if(timerLoop.read_us()>40000) { // output every 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

    }
}