]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/cand/cand.cc
cand: Fix strategy switch malfunction.
[eurobot/public.git] / src / cand / cand.cc
index bdd33a969b8ffd2564547365f6fa614ca2ac3583..ea2cbd081226a1b04658ccdc3a0462828f25c1bf 100644 (file)
@@ -201,7 +201,7 @@ void cand_parse_frame(struct robottype_orte_data *orte, struct can_frame frame)
                        break;
                case CAN_ROBOT_SWITCHES:
                        orte->robot_switches.team_color = (frame.data[0] & CAN_SWITCH_COLOR) ? 1 : 0;
-                       orte->robot_switches.strategy = !!(frame.data[0] & CAN_SWITCH_STRATEGY);
+                       orte->robot_switches.strategy = (frame.data[0] & CAN_SWITCH_STRATEGY ? 1 : 0);
                        ORTEPublicationSend(orte->publication_robot_switches);
                        break;
                case CAN_ROBOT_BUMPERS: