v2019

Dependencies:   CRAC-Strat_2019 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac

Dependents:   Codeprincipal_2019 CRAC-Strat_2019

Revision:
2:8d8e2cf798a3
Parent:
1:116040d14164
Child:
3:19f2285a4757
--- a/Robots/Strategie_big.cpp	Fri Apr 15 10:49:40 2016 +0000
+++ b/Robots/Strategie_big.cpp	Fri Apr 15 16:43:35 2016 +0000
@@ -19,22 +19,41 @@
     led2 = 1;
     switch(id) {
         case 101://Descendre le bras pour les poissons
-            AX12_setGoal(1,190,0x0FF);
-            AX12_processChange();
+            if(InversStrat == 1) {//Si c'est inversé
+                AX12_setGoal(1,200,0x0FF);
+                AX12_processChange();
+            } else {
+                
+            }
         break;
         case 102://Remonter bras moiter
-            AX12_setGoal(1,260,0x0FF);
-            AX12_processChange();
+            if(InversStrat == 1) {//Si c'est inversé
+                AX12_setGoal(1,270,0x0FF);
+                AX12_processChange();
+            } else {
+                
+            }
         break;
         case 103://Lacher les poissons
-            AX12_setGoal(1,230,0x0FF);
-            AX12_setGoal(2,60);//Ouverture du bras
-            AX12_processChange();
+            if(InversStrat == 1) {//Si c'est inversé
+            
+                AX12_setGoal(1,210,0x0FF);
+                AX12_processChange();
+                wait_ms(500);
+                AX12_setGoal(2,90);//Ouverture du bras
+                AX12_processChange();
+            } else {
+                
+            }
         break;
         case 104://Rentrer le bras
-            AX12_setGoal(1,280,0x0FF);
-            AX12_setGoal(2,160);//fermer le bras
-            AX12_processChange();
+            if(InversStrat == 1) {//Si c'est inversé
+                AX12_setGoal(1,278,0x0FF);
+                AX12_setGoal(2,160);//fermer le bras
+                AX12_processChange();
+            } else {
+                
+            }
         break;
         default:
             return 0;//L'action n'existe pas, il faut utiliser le CAN