carte esclave Petit Robot

Dependencies:   mbed Herkulex_Library_2019 actions_Gr ident_crac actions_Pr

Revision:
38:9295a9721acb
Parent:
36:04c3ad41064d
Child:
39:124575240d09
--- a/main.cpp	Thu May 23 14:18:03 2019 +0000
+++ b/main.cpp	Thu May 23 17:23:10 2019 +0000
@@ -46,19 +46,21 @@
 #ifdef ROBOT_SMALL
     pc.printf("\nPetit robot\n\n");
     deverouillage_torque();
-    gabarit_petit_robot();
 #endif
 
 
 
 #ifdef ROBOT_BIG
     pc.printf("\nGros robot\n\n");
-    clear(doigt,2);
-    setTorque(doigt, TORQUE_ON,2);
+    //clear(doigt,2);
+    //setTorque(doigt, TORQUE_ON,2);
+    deverouillage_torque();
     positionControl(doigt,384,100,BLED_ON,2);
     wait(1.0);
 #endif
 
+    gabarit_robot();
+
 
     pc.printf("\nLAUNCHED");
     while(1) {
@@ -90,10 +92,10 @@
 #endif
 
 #ifdef ROBOT_BIG
-        /*automate_ventouse_presentoir_avant();
+        automate_ventouse_presentoir_avant();
         automate_ventouse_goldenium_avant();
         automate_ventouse_relache_avant();
-        automate_ventouse_accelerateur_avant();*/
+        automate_ventouse_accelerateur_avant();
 
         fifo_couleur();
         ascenseur();
@@ -200,19 +202,26 @@
 
 
 
+            case PRESENTOIR_AVANT:
+                fpresentoir_avant=1;
+                break;
+
+            case GABARIT_ROBOT:
+                SendAck(ACKNOWLEDGE_HERKULEX, ACK_ACTION);
+                gabarit_robot();
+
+                SendAck(ACKNOWLEDGE_HERKULEX, ACK_FIN_ACTION);
+                break;
+
+
+
+
 #ifdef ROBOT_SMALL
 
 
 //-------------------------------------------------------------------------Actions petit robot----------------------------------------------
-            case GABARIT_PETIT_ROBOT:
-                SendAck(ACKNOWLEDGE_HERKULEX, ACK_ACTION);
-                gabarit_petit_robot();
-                SendAck(ACKNOWLEDGE_HERKULEX, ACK_FIN_ACTION);
-                break;
 
-            case PRESENTOIR_AVANT:
-                fpresentoir_avant=1;
-                break;
+
 
             case PRESENTOIR_ARRIERE:
                 fpresentoir_arriere=1;
@@ -304,6 +313,8 @@
 #endif
 
 #ifdef ROBOT_BIG
+
+
             case ASCENSEUR:
                 flag_ascenseur = msgRxBuffer[FIFO_lecture].data[0];
                 break;