code avec modifs, programme mit dans les robots pour les derniers matchs

Dependencies:   mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait

Files at this revision

API Documentation at this revision

Comitter:
gabrieltetar
Date:
Mon May 25 18:00:16 2020 +0000
Parent:
17:1cf2043c5c01
Child:
19:e70b9d4a319c
Commit message:
Suppression du bluetooth

Changed in this revision

Globals/global.h 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
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Globals/global.h	Thu Mar 12 15:39:40 2020 +0000
+++ b/Globals/global.h	Mon May 25 18:00:16 2020 +0000
@@ -25,9 +25,6 @@
 
 //#include "peripheriques.h"
 extern Serial pc;
-extern Serial rn42_Tx;
-extern Serial rn42_Rx;
-extern Serial rn42_pr;
 extern LiaisonBluetooth liaison_Tx;
 extern LiaisonBluetooth liaison_Rx;
 extern LiaisonBluetooth liaison_pr;
--- a/Strategie/Strategie.cpp	Thu Mar 12 15:39:40 2020 +0000
+++ b/Strategie/Strategie.cpp	Mon May 25 18:00:16 2020 +0000
@@ -1156,7 +1156,6 @@
             */
             //debug_Instruction(instruction);
             //affichage_debug(gameEtat);
-            //rn42_Tx.printf("A");//lance l'electron
             actionPrecedente = instruction.order;
             switch(instruction.order) {
                 case MV_BEZIER: {
--- a/main.cpp	Thu Mar 12 15:39:40 2020 +0000
+++ b/main.cpp	Mon May 25 18:00:16 2020 +0000
@@ -4,34 +4,16 @@
 
 CAN can1(PB_8,PB_9); // Rx&Tx pour le CAN
 CAN can2(PB_5, PB_13);
-
-void bluetooth_init(void);
-DigitalIn choix_robot(PG_12);
 CANMessage msgRxBuffer[SIZE_FIFO];
 unsigned char FIFO_ecriture;
 char strat_sd[10][SIZE+8];
 char PATH[10][SIZE+8];
-
-Serial rn42_pr(PG_14, PG_9);
-//Serial rn42(PA_1,PA_2);
-Serial rn42_Tx(PA_2,NC);
-Serial rn42_Rx(NC,PA_1);
-
 Serial pc(USBTX,USBRX);
-LiaisonBluetooth liaison_Rx(&rn42_Rx,&pc);
-LiaisonBluetooth liaison_Tx(&rn42_Tx,&pc);
-LiaisonBluetooth liaison_pr(&rn42_pr,&pc);
-
 char cheminFileStart[SIZE+8]; //Le chemin du fichier de strat, utiliser strcpy(cheminFileStart,"/local/strat.txt");
 struct S_Instruction strat_instructions[SIZE_BUFFER_FILE]; //La liste des instruction chargé en mémoire
 unsigned char nb_instructions; //Le nombre d'instruction dans le fichier de strategie
 unsigned char actual_instruction;//La ligne de l'instruction en cours d'execution
-
-
-
 unsigned char InversStrat = 1;//Si à 1, indique que l'on part de l'autre cote de la table(inversion des Y)
-
-
 unsigned short waitingAckID=0;//L'id du ack attendu
 unsigned short waitingAckFrom=0;//La provenance du ack attendu
 unsigned short waitingId=0;
@@ -56,8 +38,6 @@
 }
 
 
-
-
 /**********************************************************************************/
 /* FUNCTION NAME: main                                                            */
 /* DESCRIPTION  : Fonction principal du programme                                 */
@@ -68,7 +48,6 @@
     can2.frequency(1000000);
     lcd.DisplayStringAt(0, 0,(uint8_t *)"Initialisation", LEFT_MODE);
     led1 = 1;
-    bluetooth_init();
     lecture_fichier(); //bloquant si pas de carte SD
     led1 = 0;
     wait_ms(2000);//Attente pour que toutes les cartes se lancent et surtout le CANBlue
@@ -79,19 +58,3 @@
     }
 }
 
-void bluetooth_init(void){
-    rn42_Tx.baud(115200);
-    rn42_Rx.baud(115200);
-    rn42_pr.baud(115200);
-    pc.baud(115200);
-    pc.printf("ok1");
-    /*while(1){ // sert au paramètrage des module RN42
-        while(pc.readable()){
-            rn42_Tx.putc(pc.getc());
-            
-        }
-        while(rn42_Rx.readable()){
-            pc.putc(rn42_Rx.getc());
-        }
-    }*/
-}