]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Allow switching strategy when start pluged in.
authorMichal Vokac <vokac.m@gmail.com>
Tue, 24 May 2011 00:25:03 +0000 (02:25 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Tue, 24 May 2011 00:25:03 +0000 (02:25 +0200)
We have extra switch (not bumper like last year)for strategy switching.
Now it is not necessary enable strategy switch only after power on.

src/robofsm/robot_orte.c

index 8861d9de4c5927960a56caacf003ec87285d5cd0..e398228982c73aff267b7c5ec59490f53e3d5cc8 100644 (file)
@@ -417,7 +417,7 @@ void rcv_robot_switches_cb(const ORTERecvInfo *info, void *vinstance,
                case NEW_DATA:
                        robot.team_color = instance->team_color;
 
-                       if (!last_strategy && instance->strategy && (robot.start_state == POWER_ON)) {
+                       if (!last_strategy && instance->strategy) {
                                        /* strategy switching */
                                        FSM_SIGNAL(MAIN, EV_SWITCH_STRATEGY, NULL);
                        }