]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Debug info improvement.
authorPetr Kubiznak <kubizpet@fel.cvut.cz>
Wed, 26 May 2010 12:53:09 +0000 (14:53 +0200)
committerPetr Kubiznak <kubizpet@fel.cvut.cz>
Wed, 26 May 2010 12:53:09 +0000 (14:53 +0200)
src/camera/rozkuk/rozkuk.cxx

index 356045de6ce1764f32b31e513e732214a9722a75..d56d6d0443e6dbb44f1bc442d2ec5e6bd035d8b7 100644 (file)
@@ -405,7 +405,7 @@ int modeManager(int defaultMode) {
        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");
@@ -552,12 +552,16 @@ void freeMasks(void) {
 
 /** 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");