carte_strategie_2019
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Diff: Strategie/Strategie.cpp
- Revision:
- 79:d9c64cd4588c
- Parent:
- 78:c0533a36da8f
- Child:
- 80:545a9bf561e1
diff -r c0533a36da8f -r d9c64cd4588c Strategie/Strategie.cpp --- a/Strategie/Strategie.cpp Tue May 28 20:37:59 2019 +0000 +++ b/Strategie/Strategie.cpp Wed May 29 10:10:47 2019 +0000 @@ -463,17 +463,24 @@ while(TEST_TIR_BALLE.Touched()); while(1) { TEST_TIR_BALLE.Draw(0xFFF0F0F0, 0); - //etat =TEST_TIR ; - //lcd.Clear(LCD_COLOR_WHITE); - /* CANMessage trame_Tx = CANMessage(); - trame_Tx.len = 1; - trame_Tx.format = CANStandard; - trame_Tx.type = CANData; - trame_Tx.id=CHOICE_COLOR; - trame_Tx.data[0]=0x2; - can2.write(trame_Tx);*/ - rn42_Tx.printf("A"); - pc.printf("electron\r"); + // rn42_Tx.printf("A");//experience +#ifdef ROBOT_SMALL + liaison_Tx.envoyer_short(0x30,666); + pc.printf("data\r"); +#else + + // lire(); + /* if (bluetooth.readable()) + pc.putc(bluetooth.getc()); + + if (pc.readable()) { + char c = pc.getc(); + if (c == 'A') { + liaison.envoyer_short(PAQUET_IDENTIFIANT_RAFRAICHIRSCORE, 20); + pc.printf("rafraichir\n"); + } + }*/ +#endif } //ModeDemo=1; } else if(TEST_IMMEUBLE.Touched()) { @@ -892,6 +899,7 @@ break; case ETAT_GAME_WAIT_FOR_JACK: if(instruction.order==POSITION_DEBUT) { + SendRawId(RECALAGE_START); switch(etat_pos) { // AUTOMATE PERMETTANT AU ROBOT DE SE POSITIONNER TOUT SEUL AU DEBUT DE LA PARTIE (Ne PAS RETIRER LE JACK PENDANT CE TEMPS !!!) case RECALAGE_1: waitingAckID = ASSERVISSEMENT_RECALAGE;