Programme carte strategie (disco)

Dependencies:   mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac

Committer:
Sitkah
Date:
Fri Apr 06 13:47:19 2018 +0000
Revision:
29:41e02746041d
Parent:
15:c2fc239e85df
Child:
30:a1e37af4bbde
version fusionn?e

Who changed what in which revision?

UserRevisionLine numberNew contents of line
antbig 0:ad97421fb1fb 1 #ifndef CRAC_STRATEGIE
antbig 0:ad97421fb1fb 2 #define CRAC_STRATEGIE
antbig 0:ad97421fb1fb 3
ClementBreteau 14:c8fc06c4887f 4 // codeur droit A maron bleu, B maron
antbig 0:ad97421fb1fb 5
antbig 0:ad97421fb1fb 6 typedef enum
antbig 0:ad97421fb1fb 7 {
antbig 0:ad97421fb1fb 8 ETAT_CHECK_CARTE_SCREEN, //Envoie check carte screen
antbig 0:ad97421fb1fb 9 ETAT_CHECK_CARTE_SCREEN_WAIT_ACK, //Time out de 1s si erreur clignotement des led et fin prog
antbig 0:ad97421fb1fb 10 ETAT_CHECK_CARTES, //Envoie check toutes les carte
antbig 0:ad97421fb1fb 11 ETAT_CHECK_CARTES_WAIT_ACK, //Time out de 1s
antbig 0:ad97421fb1fb 12 ETAT_WAIT_FORCE,//Attente du forçage du lancement
antbig 0:ad97421fb1fb 13 ETAT_CONFIG, //attente reception du choix du mode( debug ou game)
antbig 0:ad97421fb1fb 14
antbig 1:116040d14164 15 ETAT_GAME_INIT,//Mise en mémoire du fichier de stratégie
antbig 4:88431b537477 16 ETAT_GAME_WAIT_FOR_JACK,//Attente du retrait du jack
antbig 4:88431b537477 17 ETAT_GAME_START,//Lancement du timer 90s
antbig 0:ad97421fb1fb 18 ETAT_GAME_LOAD_NEXT_INSTRUCTION,
antbig 0:ad97421fb1fb 19 ETAT_GAME_PROCESS_INSTRUCTION,
antbig 0:ad97421fb1fb 20 ETAT_GAME_WAIT_ACK,
antbig 0:ad97421fb1fb 21 ETAT_GAME_JUMP_TIME,
ClementBreteau 15:c2fc239e85df 22 ETAT_GAME_JUMP_CONFIG,
antbig 0:ad97421fb1fb 23 ETAT_GAME_JUMP_POSITION,
antbig 0:ad97421fb1fb 24 ETAT_GAME_WAIT_END_INSTRUCTION,
antbig 0:ad97421fb1fb 25
antbig 5:dcd817534b57 26 ETAT_WARNING_TIMEOUT,//Attente de la trame fin de danger ou du timeout de 2s
antbig 5:dcd817534b57 27 ETAT_WARING_END_BALISE_WAIT,//Attente d'une seconde apres la fin d'un End Balise pour etre sur que c'est bon
antbig 5:dcd817534b57 28 ETAT_WARNING_END_LAST_INSTRUCTION,//trouver le meilleur moyen de reprendre l'instruction en cours
antbig 5:dcd817534b57 29 ETAT_WARNING_SWITCH_STRATEGIE,//Si à la fin du timeout il y a toujours un robot, passer à l'instruction d'erreur
antbig 5:dcd817534b57 30
antbig 0:ad97421fb1fb 31 ETAT_END,
Sitkah 29:41e02746041d 32 ETAT_END_LOOP,
Sitkah 29:41e02746041d 33
antbig 0:ad97421fb1fb 34 } E_stratGameEtat;
antbig 0:ad97421fb1fb 35
Sitkah 29:41e02746041d 36
antbig 0:ad97421fb1fb 37
antbig 4:88431b537477 38 /****************************************************************************************/
antbig 4:88431b537477 39 /* FUNCTION NAME: canProcessRx */
antbig 4:88431b537477 40 /* DESCRIPTION : Fonction de traitement des messages CAN */
antbig 4:88431b537477 41 /****************************************************************************************/
antbig 0:ad97421fb1fb 42 void canProcessRx(void);
Sitkah 29:41e02746041d 43 void automate_process(void);
Sitkah 29:41e02746041d 44 void automate_etat_ihm(void);
Sitkah 29:41e02746041d 45 void init_lcd(void);
Sitkah 29:41e02746041d 46 #endif