carte_strategie_2019
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Revision 91:42ae63e5daf5, committed 2019-06-01
- Comitter:
- kyxstark
- Date:
- Sat Jun 01 02:50:52 2019 +0000
- Parent:
- 90:2a3e2dca09a0
- Commit message:
- reprise erreur asserv correction bug;
Changed in this revision
Robots/Strategie_big.cpp | Show annotated file Show diff for this revision Revisions of this file |
Strategie/Strategie.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2a3e2dca09a0 -r 42ae63e5daf5 Robots/Strategie_big.cpp --- a/Robots/Strategie_big.cpp Sat Jun 01 01:42:42 2019 +0000 +++ b/Robots/Strategie_big.cpp Sat Jun 01 02:50:52 2019 +0000 @@ -127,7 +127,7 @@ break; case 23: - SendAccel(var1,(unsigned short)var2);//,(unsigned short)arg2, (unsigned short)arg2); + SendAccel((unsigned short)var1,(unsigned short)var2);//,(unsigned short)arg2, (unsigned short)arg2); wait_us(200); waitingAckFrom = 0; waitingAckID = 0;
diff -r 2a3e2dca09a0 -r 42ae63e5daf5 Strategie/Strategie.cpp --- a/Strategie/Strategie.cpp Sat Jun 01 01:42:42 2019 +0000 +++ b/Strategie/Strategie.cpp Sat Jun 01 02:50:52 2019 +0000 @@ -1325,6 +1325,10 @@ break; case ACTION: + + waitingAckID_FIN = 0; + waitingAckFrom_FIN = 0; + int tempo = 0; waitingAckID= ACK_ACTION; //On veut un ack de type action waitingAckFrom = ACKNOWLEDGE_HERKULEX; //de la part des herkulex @@ -1443,8 +1447,8 @@ waitingAckFrom_FIN = ACKNOWLEDGE_HERKULEX; //de la part des herkulex/actionneurs } else if(telemetreDistance == 5000) { // on est dans le cas ou l'on fait une ligne suivant la distance du telemetre - waitingAckID_FIN = ASSERVISSEMENT_RECALAGE; - waitingAckFrom_FIN = INSTRUCTION_END_MOTEUR; + //waitingAckID_FIN = ASSERVISSEMENT_RECALAGE; + //waitingAckFrom_FIN = INSTRUCTION_END_MOTEUR; telemetreDistance = 0; } } else { // si on attend la reponse du telemetre @@ -2114,9 +2118,10 @@ case ASSERVISSEMENT_ERROR_MOTEUR://erreur asservissement { + unsigned short recieveAckID;// = (unsigned short)msgRxBuffer[FIFO_lecture].data[0] | ( ((unsigned short)msgRxBuffer[FIFO_lecture].data[1]) <<8); memcpy(&recieveAckID, msgRxBuffer[FIFO_lecture].data, 2); - if(recieveAckID == waitingAckID_FIN) + if(recieveAckID == waitingAckID_FIN && waitingAckFrom_FIN == INSTRUCTION_END_MOTEUR) { if(flagNonRepriseErrorMot) { actual_instruction = instruction.nextLineError;