Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CRAC-Strat_2019 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Dependents: Codeprincipal_2019 CRAC-Strat_2019
Strategie/Strategie.h
- Committer:
- ClementBreteau
- Date:
- 2017-03-31
- Revision:
- 14:c8fc06c4887f
- Parent:
- 5:dcd817534b57
- Child:
- 15:c2fc239e85df
File content as of revision 14:c8fc06c4887f:
#ifndef CRAC_STRATEGIE
#define CRAC_STRATEGIE
#include "global.h"
// codeur droit A maron bleu, B maron
typedef enum
{
ETAT_CHECK_CARTE_SCREEN, //Envoie check carte screen
ETAT_CHECK_CARTE_SCREEN_WAIT_ACK, //Time out de 1s si erreur clignotement des led et fin prog
ETAT_CHECK_CARTES, //Envoie check toutes les carte
ETAT_CHECK_CARTES_WAIT_ACK, //Time out de 1s
ETAT_WAIT_FORCE,//Attente du forçage du lancement
ETAT_CONFIG, //attente reception du choix du mode( debug ou game)
ETAT_GAME_INIT,//Mise en mémoire du fichier de stratégie
ETAT_GAME_WAIT_FOR_JACK,//Attente du retrait du jack
ETAT_GAME_START,//Lancement du timer 90s
ETAT_GAME_LOAD_NEXT_INSTRUCTION,
ETAT_GAME_PROCESS_INSTRUCTION,
ETAT_GAME_WAIT_ACK,
ETAT_GAME_JUMP_TIME,
ETAT_GAME_JUMP_POSITION,
ETAT_GAME_WAIT_END_INSTRUCTION,
ETAT_WARNING_TIMEOUT,//Attente de la trame fin de danger ou du timeout de 2s
ETAT_WARING_END_BALISE_WAIT,//Attente d'une seconde apres la fin d'un End Balise pour etre sur que c'est bon
ETAT_WARNING_END_LAST_INSTRUCTION,//trouver le meilleur moyen de reprendre l'instruction en cours
ETAT_WARNING_SWITCH_STRATEGIE,//Si à la fin du timeout il y a toujours un robot, passer à l'instruction d'erreur
ETAT_END,
ETAT_END_LOOP
} E_stratGameEtat;
/****************************************************************************************/
/* FUNCTION NAME: automate_process */
/* DESCRIPTION : Automate de gestion de la stratégie du robot */
/****************************************************************************************/
void automate_process(void);
/****************************************************************************************/
/* FUNCTION NAME: canProcessRx */
/* DESCRIPTION : Fonction de traitement des messages CAN */
/****************************************************************************************/
void canProcessRx(void);
#endif