]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
act: store_puck_in_holder slightly changed
authorFilip Jares <filipjares@post.cz>
Sat, 25 Apr 2009 05:29:58 +0000 (07:29 +0200)
committerFilip Jares <filipjares@post.cz>
Sat, 25 Apr 2009 05:29:58 +0000 (07:29 +0200)
src/robofsm/fsmact.c

index e23687087b91fd8b3e3579e4b6fbea44e906cd17..3d0083c28289c454c5f5a75cdb367c017af6669f 100644 (file)
@@ -291,7 +291,7 @@ FSM_STATE(suck_the_puck)
 
 FSM_STATE(store_pucks_in_holder)
 {
-       static int i;
+       //static int i;
        switch (FSM_EVENT) {
        case EV_ENTRY:
                act_holder(HOLDER_OPENED);
@@ -301,24 +301,24 @@ FSM_STATE(store_pucks_in_holder)
                        FSM_TRANSITION(wait_for_command);
                        FSM_SIGNAL(MAIN, EV_ACTION_DONE, NULL);
                } else {
-                       i = 0;
+                       //i = 0;
                        act_holder(HOLDER_OPENED);
                        act_lift(LIFT_IN_HOLDER_POS);
                }
                break;
        case EV_LIFT_IN_POS:
-               switch(i) {
-               case 0:
+               /*switch(i) {
+               case 0: */
                        act_holder(HOLDER_TIGHT);
                        act_lift(LIFT_TRAVEL_POS);
-                       break;
-               case 1:
                        robot.pucks_inside++; // FIXME: (?) change this variable in EV_ENTRY and only in one place?
                        basic_lift_position = HIGH;
                        FSM_TRANSITION(wait_for_command);
                        FSM_SIGNAL(MAIN, EV_ACTION_DONE, NULL);
+                       break;
+               /*case 1:
                }
-               i++;
+               i++; */
                break;
        case EV_PUCK_INSIDE: // ignore
                break;