]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
cand: Fix compilation error.
authorMichal Vokac <vokac.m@gmail.com>
Tue, 2 Oct 2012 18:03:00 +0000 (20:03 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Tue, 2 Oct 2012 18:03:00 +0000 (20:03 +0200)
src/cand/cand.cc

index a3dff71ee7b6786e6970030301cb5228cae04f5c..08f16d9a17a48763682a22fafcdf3ae464cfd5aa 100644 (file)
@@ -198,7 +198,7 @@ void cand_parse_frame(struct robottype_orte_data *orte, struct can_frame frame)
                         if (frame.data[0] & CAN_SWITCH_COLOR_1) tmp_color += 2;
                        orte->robot_switches.team_color = tmp_color;
                         */
-                        orte->robot_switches.team_color = frame.data[0] & (CAN_SWITCH_COLOR_0 + CAN_SWITCH_COLOR);
+                        orte->robot_switches.team_color = frame.data[0] & (CAN_SWITCH_COLOR_0 + CAN_SWITCH_COLOR_1);
                        orte->robot_switches.strategy = (frame.data[0] & CAN_SWITCH_STRATEGY ? 1 : 0);
                         orte->robot_switches.home = (frame.data[0] & CAN_SWITCH_HOME ? 1 : 0);
                        ORTEPublicationSend(orte->publication_robot_switches);
@@ -382,7 +382,7 @@ void rcv_cl_sensor_cmd_cb(const ORTERecvInfo *info, void *vinstance,
         switch (info->status) {
                 case NEW_DATA:
                         unsigned char data[1];
-                        data[0] = orte_data->bank_nbr;
+                        data[0] = orte_data->cl_sensor_cmd.bank_nbr;
                         can_send(CAN_CL_SENSOR_CMD, 1, data);
                         break;
                 case DEADLINE: