carte_strategie_2019
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Diff: Strategie/Strategie.cpp
- Revision:
- 87:349194e73b77
- Parent:
- 86:05a0c066bdbe
- Child:
- 88:37714217b4c4
--- a/Strategie/Strategie.cpp Fri May 31 19:13:59 2019 +0000 +++ b/Strategie/Strategie.cpp Sat Jun 01 00:26:35 2019 +0000 @@ -74,7 +74,7 @@ short SCORE_PR=0; int flag = 0, flag_strat = 0, flag_timer; -int flagReceptionTelemetres = 0; +int flagReceptionTelemetres = 0, flagNonRepriseErrorMot = 0; char Ack_strat = 0; signed char Strat = 0; signed char FIFO_lecture=0;//Position du fifo de lecture des messages CAN @@ -1040,6 +1040,7 @@ //tactile_printf("Start");//Pas vraiment utile mais bon break; case ETAT_GAME_LOAD_NEXT_INSTRUCTION: + flagNonRepriseErrorMot = 0; /* Chargement de l'instruction suivante ou arret du robot si il n'y a plus d'instruction */ @@ -2117,6 +2118,20 @@ } flag=1; break; + + case INSTRUCTION_ERROR_MOTEUR//erreur asservissement + if(flagNonRepriseErrorMot) + { + actual_instruction = instruction.nextLineError; + gameEtat = ETAT_GAME_LOAD_NEXT_INSTRUCTION; + flagNonRepriseErrorMot = 0; + } + else + { + flagNonRepriseErrorMot = 1; + gameEtat = ETAT_WARNING_END_LAST_INSTRUCTION; + } + break; /////////////////////////////////////Acknowledges de Reception de la demande d'action//////////////////////////////////////// case ACKNOWLEDGE_HERKULEX: @@ -2138,12 +2153,7 @@ //on desactive la balise dans les rotations if(msgRxBuffer[FIFO_lecture].id==ACKNOWLEDGE_MOTEUR && ASSERVISSEMENT_ROTATION==recieveAckID)ingnorBalise=1; if(msgRxBuffer[FIFO_lecture].id==INSTRUCTION_END_MOTEUR && ASSERVISSEMENT_ROTATION==recieveAckID)ingnorBalise=0; -//erreur asservissement - /*if(msgRxBuffer[FIFO_lecture].id==INSTRUCTION_END_MOTEUR && ASSERVISSEMENT_ERROR_MOTEUR==recieveAckID){ - timeoutWarningWaitEnd.reset(); - timeoutWarningWaitEnd.start(); - gameEtat = ETAT_WARING_END_BALISE_WAIT; - }*/ + // SendMsgCan(0x666,&ingnorBalise,1);