CRAC Team / Mbed 2 deprecated carte_straegie_2019

Dependencies:   mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac

Files at this revision

API Documentation at this revision

Comitter:
Artiom
Date:
Thu May 23 07:54:38 2019 +0000
Parent:
53:e96acb11a51f
Child:
55:1e3dab1f90f4
Commit message:

Changed in this revision

Globals/ident_crac.h Show annotated file Show diff for this revision Revisions of this file
Robots/Strategie_small.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/Globals/ident_crac.h	Wed May 22 09:52:00 2019 +0000
+++ b/Globals/ident_crac.h	Thu May 23 07:54:38 2019 +0000
@@ -143,6 +143,9 @@
 #define VENTOUSE_AV_CENTRE_BALANCE 0x216
 #define VENTOUSE_AR_CENTRE_BALANCE 0x217
 
+#define ACCELERATEUR_INSERTION_AVANT_GAUCHE 0X218
+#define ACCELERATEUR_INSERTION_DERRIERE_GAUCHE 0X219
+
 //commande pompe
 #define HACHEUR_GET_ATOM            0x520
 #define HACHEUR_GET_ATOM_ACK        0x521
--- a/Robots/Strategie_small.cpp	Wed May 22 09:52:00 2019 +0000
+++ b/Robots/Strategie_small.cpp	Thu May 23 07:54:38 2019 +0000
@@ -84,13 +84,19 @@
             break;
         case 117:
             SendRawId(RECROQUEVILLER);
-             break;
+            break;
         case 118:
             SendRawId(VENTOUSE_AV_CENTRE_BALANCE);
             break;
-         case 119:
+        case 119:
             SendRawId(VENTOUSE_AR_CENTRE_BALANCE);
             break;
+        case 120:
+            SendRawId(ACCELERATEUR_INSERTION_AVANT_GAUCHE);
+            break;
+        case 121:
+            SendRawId(ACCELERATEUR_INSERTION_DERRIERE_GAUCHE);
+            break;
 
         case 150:
             SCORE_PR+=arg1;
--- a/Strategie/Strategie.cpp	Wed May 22 09:52:00 2019 +0000
+++ b/Strategie/Strategie.cpp	Thu May 23 07:54:38 2019 +0000
@@ -4,7 +4,7 @@
 #include <math.h>
 //#include "StrategieManager.h"
 
-
+3
 
 #define M_PI 3.14159265358979323846
 #define VERT 0xFF00FF00
@@ -1845,7 +1845,7 @@
                     float x_robot_adversaire = x_robot + (dist_robot_adversaire)*cos((float)(theta_adversaire)* M_PI/1800);
                     float y_robot_adversaire = y_robot + (dist_robot_adversaire)*sin((float)(theta_adversaire)*M_PI/1800);
                     
-                    x_cote_droit[0] = x_robot_adversaire + (proxy)*cos((float)(theta_adversaire+ang_target-1300)*M_PI/1800);
+                    x_cote_droit[0] = x_robot_adversaire + (proxy)*cos((float)(theta_adversaire+ang_target-1300.0)*M_PI/1800);
                     y_cote_droit[0] = y_robot_adversaire + (proxy)*sin((float)(theta_adversaire+ang_target-1300)*M_PI/1800);
                     x_cote_gauche[0] = x_robot_adversaire + (proxy)*cos((float)(theta_adversaire+ang_target+1300)*M_PI/1800);
                     y_cote_gauche[0] = y_robot_adversaire + (proxy)*sin((float)(theta_adversaire+ang_target+1300)*M_PI/1800);