
code avec modifs, programme mit dans les robots pour les derniers matchs
Dependencies: mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait
Diff: Strategie/Strategie.cpp
- Revision:
- 22:c7763a7ec6c7
- Parent:
- 21:d137ec53c3a9
- Child:
- 24:1a13c998c7ac
--- a/Strategie/Strategie.cpp Wed Jun 24 09:39:42 2020 +0000 +++ b/Strategie/Strategie.cpp Fri Jun 26 13:08:54 2020 +0000 @@ -37,7 +37,7 @@ unsigned short x; unsigned short y; unsigned char isStopEnable = 1;//Permet de savoir si il faut autoriser le stop via les balises -unsigned short flag_check_carte = 0, flag_strat = 0, flag_timer; +unsigned short flag_check_carte1 = 0,flag_check_carte2 = 0, flag_strat = 0, flag_timer; int flagReceptionTelemetres = 0, flagNonRepriseErrorMot = 0; @@ -199,7 +199,7 @@ if(countAliveCard >= NOMBRE_CARTES) { gameEtat = ETAT_CONFIG; SendRawId(ECRAN_ALL_CHECK); - flag_check_carte=1; + flag_check_carte1=1; //tactile_printf("Selection couleur et strategie"); } else { @@ -218,7 +218,7 @@ if(checkCurrent >= NOMBRE_CARTES) { if(countAliveCard == NOMBRE_CARTES) { gameEtat = ETAT_CONFIG; - flag_check_carte=1; + flag_check_carte1=1; } else { gameEtat = ETAT_WAIT_FORCE; waitingAckFrom = ECRAN_ALL_CHECK; @@ -963,25 +963,15 @@ switch(identifiant) { case ALIVE_MOTEUR: - if (strat_etat_s == ATT) { - - lcd.SetTextColor(LCD_COLOR_LIGHTGREEN); - lcd.FillRect(0,400,400,150); - lcd.SetTextColor(LCD_COLOR_BLACK); - lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); - lcd.DisplayStringAt(80, 450, (uint8_t *)"Carte Moteur", LEFT_MODE); - } + if (strat_etat_s == INIT2) + demarrage(3); + flag_check_carte1=1; break; case ALIVE_BALISE: - if (strat_etat_s == ATT) { - - lcd.SetTextColor(LCD_COLOR_LIGHTGREEN); - lcd.FillRect(0,600,400,150); //carte AX12 - lcd.SetTextColor(LCD_COLOR_BLACK); - lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); - lcd.DisplayStringAt(110, 650, (uint8_t *)"Balise", LEFT_MODE); - } + if (strat_etat_s == INIT2) + demarrage(4); + flag_check_carte2=1; break; case RESET_IHM: @@ -1003,7 +993,7 @@ if(waitingAckFrom == msgRxBuffer[FIFO_lecture].id) { waitingAckFrom = 0;//C'est la bonne carte qui indique qu'elle est en ligne } - flag_check_carte=1; + flag_check_carte1=1; break; case ASSERVISSEMENT_ERROR_MOTEUR://erreur asservissement