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: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Revision 41:b029ddc4d60e, committed 2018-05-11
- Comitter:
- Sitkah
- Date:
- Fri May 11 12:09:26 2018 +0000
- Parent:
- 40:21bb685b553b
- Child:
- 42:657b6a573e11
- Commit message:
- ed
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 |
--- a/Robots/Strategie_big.cpp Thu May 10 18:49:25 2018 +0000
+++ b/Robots/Strategie_big.cpp Fri May 11 12:09:26 2018 +0000
@@ -70,6 +70,7 @@
msgTx.data[3]=var1;
msgTx.data[4]=var2;
can2.write(msgTx);
+ break;
case 108:
SendRawId(INTER_BAISSER_ATTRAPE_BLOC_AvG);
break;
@@ -82,7 +83,12 @@
case 112:
SendRawId(RANGER_ATTRAPE_BLOC_AvG);
break;
-
+ case 113:
+ msgTx.id=LIRE_PANNEAU;
+ msgTx.len=1;
+ msgTx.data[0]=var1;
+ can2.write(msgTx);
+ break;
case 150:
SCORE_GR+=var1;
--- a/Strategie/Strategie.cpp Thu May 10 18:49:25 2018 +0000
+++ b/Strategie/Strategie.cpp Fri May 11 12:09:26 2018 +0000
@@ -155,7 +155,7 @@
void Setflag(void);
void can2Rx_ISR(void);
signed char Bouton_Strat (void);
-
+signed char blocage_balise;
void print_segment(int nombre, int decalage);
void affichage_compteur (int nombre);
void effacer_segment(long couleur);
@@ -213,6 +213,7 @@
if(gameEtat == ETAT_GAME_WAIT_FOR_JACK) {
gameEtat = ETAT_GAME_START;//On débute le match
etat=COMPTEUR;
+ blocage_balise=1;
}
}
@@ -1172,7 +1173,7 @@
#ifdef ROBOT_SMALL
GoStraight(-450, 0, 0, 0);
#else
- GoStraight(75, 0, 0, 0);
+ GoStraight(150, 0, 0, 0);
#endif
while(waitingAckID !=0 && waitingAckFrom !=0)
canProcessRx();
@@ -1543,13 +1544,13 @@
}
}
else if(instruction.nextActionType == WAIT) { ///Actualisation des waiting ack afin d'attendre la fin des actions
- wait_ms(200);
+ /*wait_ms(200);
#ifdef ROBOT_BIG
SetOdometrie(ODOMETRIE_BIG_POSITION, x_robot, y_robot, theta_robot);
#else
SetOdometrie(ODOMETRIE_SMALL_POSITION, x_robot, y_robot, theta_robot);
#endif
- wait_ms(200);
+ wait_ms(200);*/
gameEtat = ETAT_GAME_WAIT_END_INSTRUCTION;
switch(instruction.order)
@@ -1699,13 +1700,13 @@
#endif
gameEtat = ETAT_END;*/
- wait_ms(200);
+ /*wait_ms(200);
#ifdef ROBOT_BIG
SetOdometrie(ODOMETRIE_BIG_POSITION, x_robot, y_robot, theta_robot);
#else
SetOdometrie(ODOMETRIE_SMALL_POSITION, x_robot, y_robot, theta_robot);
#endif
- wait_ms(200);
+ wait_ms(200);*/
switch(actionPrecedente){
case MV_LINE:
@@ -2068,11 +2069,18 @@
break;
case RECEPTION_COULEUR:
+ if (blocage_balise==0){
couleur1=msgRxBuffer[FIFO_lecture].data[0];
couleur2=msgRxBuffer[FIFO_lecture].data[1];
couleur3=msgRxBuffer[FIFO_lecture].data[2];
+
+ /*lcd.DisplayStringAt(0,LINE(16),(unsigned char *)couleur1+'0',LEFT_MODE);
+ lcd.DisplayStringAt(0,LINE(16+1),(unsigned char *)couleur2+'0',LEFT_MODE);
+ lcd.DisplayStringAt(0,LINE(16+2),(unsigned char *)couleur3+'0',LEFT_MODE);*/
+ }
+
break;
-
+
case NO_BLOC: //il n'y a pas de bloc, on saute les étapes liées à l'attrape bloc
actual_instruction = instruction.nextLineError;
gameEtat = ETAT_GAME_LOAD_NEXT_INSTRUCTION;