}
}
+void rcv_hokuyo_scan_cb(const ORTERecvInfo *info, void *vinstance,
+ void *recvCallBackParam)
+{
+ struct hokuyo_scan_type *instance = (struct hokuyo_scan_type *)vinstance;
+
+ switch (info->status) {
+ case NEW_DATA: {
+ ROBOT_LOCK(hokuyo);
+ robot.hokuyo = *instance;
+ ROBOT_UNLOCK(hokuyo);
+ printf("hokyo: %d %d %d\n",instance->data1, instance->data2, instance->data3);
+ update_map_hokuyo(instance);
+ break;
+ }
+ case DEADLINE:
+ DBG("%s: ORTE deadline occurred\n", __FUNCTION__);
+ break;
+ }
+}
/* ----------------------------------------------------------------------
* SUBSCRIBER CALLBACKS - EB2008
* ---------------------------------------------------------------------- */
generic_subscriber_pwr_voltage_create(&robot.gorte, rcv_pwr_voltage_cb, &robot.gorte);
generic_subscriber_pwr_ctrl_create(&robot.gorte, rcv_pwr_ctrl_cb, &robot.gorte);
generic_subscriber_robot_cmd_create(&robot.gorte, rcv_robot_cmd_cb, &robot.gorte);
+ generic_subscriber_hokuyo_scan_create(&robot.gorte, rcv_hokuyo_scan_cb, &robot.gorte);
/* create eb2008 subscribers */
eb2008_subscriber_servos_create(&robot.orte, rcv_servos_cb, &robot.orte);