extern "C" {
#include <roboorte_robottype.h>
+#include <robot.h>
}
/******************************************************************************/
#endif /*----------- DEBUG SESSION ONLY -----------*/
while(1) {
//stop recognition and wait if camera control is off
- if(!orte.camera_control.on) return MODE_WAIT;
+ //FIXME: use the following line if orte works: if(!orte.camera_control.on) return MODE_WAIT;
#ifdef ROZKUK_DEBUG /************ DEBUG SESSION ONLY ************/
/* keyboard events handeling */
cvMoveWindow(WINDOW_PROD, cvQueryFrame(capture)->width, cvQueryFrame(capture)->height+50);
#endif /*----------- DEBUG SESSION ONLY -----------*/
//load masks and run recognition mode, then free masks (they are in memory only while in recognition mode)
- if((ret=loadMasks(orte.camera_control.game_color))) return ret;
+ if((ret=loadMasks((orte.camera_control.game_color==BLUE ? clBLUE : clYELLOW)))) return ret;
mode = modeRecognize(capture);
freeMasks();
break;
case MODE_WAIT:
+ printf("waiting...\n");
sleep(1);
mode = (orte.camera_control.on ? MODE_RECOGNIZE : MODE_WAIT);
break;