code de start qui marche a la fin du premier match, base pour la suite

Fork of CRAC-Strat_2017_homologation_petit_rob by CRAC Team

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Strategie.h Source File

Strategie.h

00001 #ifndef CRAC_STRATEGIE
00002 #define CRAC_STRATEGIE
00003 
00004 #include "global.h"
00005 // codeur droit A maron bleu, B maron
00006 
00007 typedef enum
00008 {
00009     ETAT_CHECK_CARTE_SCREEN, //Envoie check carte screen
00010     ETAT_CHECK_CARTE_SCREEN_WAIT_ACK, //Time out de 1s si erreur clignotement des led et fin prog
00011     ETAT_CHECK_CARTES, //Envoie check toutes les carte
00012     ETAT_CHECK_CARTES_WAIT_ACK, //Time out de 1s
00013     ETAT_WAIT_FORCE,//Attente du forçage du lancement
00014     ETAT_CONFIG, //attente reception du choix du mode( debug ou game)
00015     
00016     ETAT_GAME_INIT,//Mise en mémoire du fichier de stratégie
00017     ETAT_GAME_WAIT_FOR_JACK,//Attente du retrait du jack
00018     ETAT_GAME_START,//Lancement du timer 90s
00019     ETAT_GAME_LOAD_NEXT_INSTRUCTION,
00020     ETAT_GAME_PROCESS_INSTRUCTION,
00021     ETAT_GAME_WAIT_ACK,
00022     ETAT_GAME_JUMP_TIME,
00023     ETAT_GAME_JUMP_CONFIG,
00024     ETAT_GAME_JUMP_POSITION,
00025     ETAT_GAME_WAIT_END_INSTRUCTION,
00026     
00027     ETAT_WARNING_TIMEOUT,//Attente de la trame fin de danger ou du timeout de 2s
00028     ETAT_WARING_END_BALISE_WAIT,//Attente d'une seconde apres la fin d'un End Balise pour etre sur que c'est bon
00029     ETAT_WARNING_END_LAST_INSTRUCTION,//trouver le meilleur moyen de reprendre l'instruction en cours
00030     ETAT_WARNING_SWITCH_STRATEGIE,//Si à la fin du timeout il y a toujours un robot, passer à l'instruction d'erreur
00031     
00032     ETAT_END,
00033     ETAT_END_LOOP
00034 } E_stratGameEtat;
00035 
00036 /****************************************************************************************/
00037 /* FUNCTION NAME: automate_process                                                      */
00038 /* DESCRIPTION  : Automate de gestion de la stratégie du robot                          */
00039 /****************************************************************************************/
00040 void automate_process(void);
00041 
00042 /****************************************************************************************/
00043 /* FUNCTION NAME: canProcessRx                                                          */
00044 /* DESCRIPTION  : Fonction de traitement des messages CAN                               */
00045 /****************************************************************************************/
00046 void canProcessRx(void);
00047 
00048 #endif