FRC_equipe1 / Mbed 2 deprecated FRC_2019

Dependencies:   mbed

main.cpp

Committer:
Wael_H
Date:
2019-05-20
Revision:
7:753e901d441b
Parent:
6:a24e1ffe27f6
Child:
8:94ecfe411d02

File content as of revision 7:753e901d441b:

#include "mbed.h"
#include "CAN_asser.h"

int main(void)
{
    bool quit = false;
    
    can_init();
        
    while(!quit)
    {
        trait_can();  
    }
    
    return 0;
}

void automate_test()
{
    static typedef enum{AVANCE,TOURNE} type_etat;
    type_etat etat = AVANCE;
    
    switch(etat)
    {
    case AVANCE:
        Gostraight(500,0,0,0);
        
        if(FlagFinDpl)
            etat = TOURNE;        
        break;
        
    case TOURNE:
        Rotate(900);
        
        if(FlagFinDpl)
            etat = AVANCE;
        break;
    }
}