]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: fix carousel locking.
authorTran Duy Khanh <trandk1@fel.cvut.cz>
Fri, 2 May 2008 11:03:50 +0000 (13:03 +0200)
committerTran Duy Khanh <trandk1@fel.cvut.cz>
Fri, 2 May 2008 11:03:50 +0000 (13:03 +0200)
src/robofsm/eb2008/fsmdisplay.cc

index 9934e683503c4d3642daf67432f40444fa4f28de..be7978a1b6d4efbb7594d89537a3ddc366aa2202 100644 (file)
@@ -132,9 +132,9 @@ int set_game_color(uint8_t col)
 int move_carousel(uint8_t dir)
 {
        uint8_t act_car_pos, new_car_pos;
-       ROBOT_LOCK(carousel);
+       ROBOT_LOCK(drives);
        act_car_pos = robot.orte.drives.carousel_pos;
-       ROBOT_UNLOCK(carousel);
+       ROBOT_UNLOCK(drives);
        switch(dir) {
                case LEFT:
                        if(act_car_pos==0)
@@ -151,9 +151,9 @@ int move_carousel(uint8_t dir)
                default:
                        break;
        }
-       ROBOT_LOCK(carousel);
+       ROBOT_LOCK(drives);
        robot.orte.drives.carousel_pos = new_car_pos;
-       ROBOT_UNLOCK(carousel);
+       ROBOT_UNLOCK(drives);
        return 0;
 }