code petit robot pour homologation

Fork of CRAC-Strat_2017_V2 by CRAC Team

Revision:
1:116040d14164
Parent:
0:ad97421fb1fb
Child:
2:8d8e2cf798a3
--- a/Robots/Strategie_big.cpp	Wed Apr 13 22:04:54 2016 +0000
+++ b/Robots/Strategie_big.cpp	Fri Apr 15 10:49:40 2016 +0000
@@ -1,4 +1,4 @@
-#include "Strategie_big.h"
+#include "StrategieManager.h"
 
 /****************************************************************************************/
 /* FUNCTION NAME: doFunnyAction                                                         */
@@ -15,9 +15,26 @@
 /****************************************************************************************/
 unsigned char doAction(unsigned char id, unsigned short speed, short angle) {
     
+    led1 = 1;
+    led2 = 1;
     switch(id) {
-        case 20:
-            
+        case 101://Descendre le bras pour les poissons
+            AX12_setGoal(1,190,0x0FF);
+            AX12_processChange();
+        break;
+        case 102://Remonter bras moiter
+            AX12_setGoal(1,260,0x0FF);
+            AX12_processChange();
+        break;
+        case 103://Lacher les poissons
+            AX12_setGoal(1,230,0x0FF);
+            AX12_setGoal(2,60);//Ouverture du bras
+            AX12_processChange();
+        break;
+        case 104://Rentrer le bras
+            AX12_setGoal(1,280,0x0FF);
+            AX12_setGoal(2,160);//fermer le bras
+            AX12_processChange();
         break;
         default:
             return 0;//L'action n'existe pas, il faut utiliser le CAN