TRR2018 omar

Dependencies:   mbed

Fork of biniou by TRR 2018

main.cpp

Committer:
GaspardD
Date:
2018-09-17
Revision:
27:f8c3f1524a64
Parent:
23:04d393220daa
Child:
29:fc984fe08ca7

File content as of revision 27:f8c3f1524a64:

#include "stateMachines.h"
Timer timerLoop;

int main()
{
    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

    }
}