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:
maximilienlv
Date:
Fri Jul 17 14:35:11 2020 +0000
Parent:
27:ff70537a7619
Child:
29:ff575aff301f
Commit message:
inversion cote bleu et jaune

Changed in this revision

Globals/ident_crac.lib Show annotated file Show diff for this revision Revisions of this file
IHM/ihm.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
Strategie/Strategie.h Show annotated file Show diff for this revision Revisions of this file
--- a/Globals/ident_crac.lib	Wed Jul 08 11:24:24 2020 +0000
+++ b/Globals/ident_crac.lib	Fri Jul 17 14:35:11 2020 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/teams/CRAC-Team/code/ident_crac/#01d1adc948df
+https://os.mbed.com/teams/CRAC-Team/code/ident_crac/#ad3c5dee616c
--- a/IHM/ihm.cpp	Wed Jul 08 11:24:24 2020 +0000
+++ b/IHM/ihm.cpp	Fri Jul 17 14:35:11 2020 +0000
@@ -265,7 +265,7 @@
                     strat_etat_s=DEMO;
                 } else if(TEST_A.Touched()) {
                     while (TEST_A.Touched());
-                    //SendRawId(TEST_VENT_A);
+                    SendRawId(VENT_ETAT);
                     TEST_A.Draw(BLEU, BLANC);
                 }  else if(TEST_NUM.Touched()) {
                     while (TEST_NUM.Touched());
@@ -529,7 +529,7 @@
             while (strat_etat_s == SELECT_SIDE) {
                 canProcessRx();
                 if(COTE_JAUNE.Touched()) {
-                    Cote = 0x0;
+                    Cote = 0x1;
                     InversStrat = Cote;
                     strat_etat_s = TACTIQUE;
                     CANMessage trame_Tx = CANMessage();
@@ -544,7 +544,7 @@
                 }
 
                 if(COTE_VIOLET.Touched()) {
-                    Cote = 0x1;
+                    Cote = 0x0;
                     InversStrat= Cote;
                     strat_etat_s = TACTIQUE;
                     CANMessage trame_Tx = CANMessage();
--- a/Strategie/Strategie.cpp	Wed Jul 08 11:24:24 2020 +0000
+++ b/Strategie/Strategie.cpp	Fri Jul 17 14:35:11 2020 +0000
@@ -286,7 +286,7 @@
                         SendRawId(RECALAGE_START);
                         waitingAckID = ASSERVISSEMENT_RECALAGE;
                         waitingAckFrom = ACKNOWLEDGE_MOTEUR;
-                        GoStraight(3000, 1,MOITIEE_ROBOT, 0);  //on se recale contre le mur donc il faut donner la valeur du centre du robot (les -5 qui trainent sont dus au tables pourraves sur place)
+                        GoStraight(3000, 1, MOITIEE_ROBOT, 0);  //on se recale contre le mur donc il faut donner la valeur du centre du robot (les -5 qui trainent sont dus au tables pourraves sur place)
                         while(waitingAckID !=0 && waitingAckFrom !=0)
                             canProcessRx();
                         waitingAckID_FIN=ASSERVISSEMENT_RECALAGE;
@@ -1548,7 +1548,7 @@
     switch(id) 
     {    
         case 120:
-            //SendRawId(ACCELERATEUR_INSERTION_AVANT_GAUCHE);
+            wait_ms(500);
             break;
 
         case 121:
@@ -1663,6 +1663,7 @@
         case 158:
             unsigned char argu_re_vent = arg1;
             SendMsgCan(VENT_RE, &argu_re_vent,sizeof(arg1));
+            wait_ms(500);
             waitingAckFrom = 0;
             waitingAckID =0;
             break;
--- a/Strategie/Strategie.h	Wed Jul 08 11:24:24 2020 +0000
+++ b/Strategie/Strategie.h	Fri Jul 17 14:35:11 2020 +0000
@@ -13,9 +13,9 @@
 }E_Stratposdebut;
     
 typedef enum {
-    INIT, 
-    ATT, 
-    CHOIX, 
+    INIT,
+    ATT,
+    CHOIX,
     DEMO,
     DEMO2,
     TEST_MOTEUR,