orte->robot_cmd.start_condition = frame.data[0];
ORTEPublicationSend(orte->publication_robot_cmd);
break;
+ case CAN_ROBOT_SWITCHES:
+ orte->robot_switches.bumper_pressed = !!(frame.data[0] & CAN_SWITCH_BUMPER);
+ orte->robot_switches.team_color = (frame.data[0] & CAN_SWITCH_COLOR) ? 1 : 0;
+ ORTEPublicationSend(orte->publication_robot_switches);
+ break;
/* positioning by odometry */
case CAN_ODO_DATA:
robottype_publisher_odo_data_create(&orte, NULL, NULL);
robottype_publisher_motion_irc_create(&orte, NULL, NULL);
robottype_publisher_robot_cmd_create(&orte, NULL, NULL);
+ robottype_publisher_robot_switches_create(&orte, NULL, NULL);
robottype_publisher_vidle_status_create(&orte, NULL, NULL);
printf("Publishers OK\n");
//#define CAN_ERROR to_boa(0x48) // FIXME: (F.J.) rename me, ...
-
+#define CAN_ROBOT_SWITCHES to_boa(0x47)
#define CAN_VIDLE_STATUS to_boa(0x48)
#define CAN_VIDLE_CMD to_per(0x49)
#define CAN_VIDLE_INITIALIZING 0x01
#define CAN_VIDLE_TIMEOUT 0x02
#define CAN_VIDLE_OUT_OF_BOUNDS 0x04
+
+#define CAN_SWITCH_BUMPER 0x01
+#define CAN_SWITCH_COLOR 0x02
type=pwr_ctrl topic=pwr_ctrl
type=pwr_voltage topic=pwr_voltage
type=robot_pos topic=ref_pos
-type=robot_cmd topic=robot_cmd
+type=robot_cmd topic=robot_cmd deadline=1
+type=robot_switches topic=robot_switches deadline=1
type=camera_result topic=camera_result
type=camera_control topic=camera_control
type=fsm_state topic=fsm_main pubdelay=1