while(!((capture=cvCaptureFromCAM(0)) || (capture=cvCaptureFromCAM(1)))) {
fprintf(stdout, "NULL capture (is camera connected?)\n");
orte.camera_result.error |= camera_ERR_NO_VIDEO;
- usleep(500*1000);
+ sleep(1);
}
orte.camera_result.error &= ~camera_ERR_NO_VIDEO;
fprintf(stdout, "rozkuk started, camera connected successfully\n");
/** Orte camera control callback function. */
void rcv_cmr_ctrl_cb(const ORTERecvInfo *info, void *vinstance, void *recvCallBackParam) {
+#ifdef ORTE_DEBUG
struct robottype_orte_data *orte_data = (struct robottype_orte_data *)recvCallBackParam;
+#endif /*----------- ORTE_DEBUG -----------*/
switch (info->status) {
case NEW_DATA:
// nothing to do - changes will be processed in the recognition loop
+#ifdef ORTE_DEBUG
printf("orte: New data: ctrl %d, clr %d\n", orte_data->camera_control.on, orte_data->camera_control.game_color);
+#endif /*----------- ORTE_DEBUG -----------*/
break;
case DEADLINE:
printf("ORTE deadline occurred - CMR_CTRL receive\n");