Ok so we're trying to make our camera pan back and forth until it sees the vision tetra, then lock and track. However it appears that whenever we call camera_set_servos() it stops searching for a color, and when we tell it to look for a color ( camera_find_color() ) it then appears to recenter the servos; we're stuck. Is there any solution to our problem?
This code block is inside Camera_Processing(), before it's own tracking routine.
Code:
if(!tracking)
{
camera_set_servos(cnt,128);
cnt += dir;
if(cnt == 210)
dir = -5;
else if(cnt == 40)
dir = 5;
printf("Didn't find it: %d\r",cnt);
}
Now, when we had it in other places using 'if(cam.conf < 60)' or something similar to track it, we had the same problem. I believe the problem with the reseting servos, is using camera_reset() in camera_find_color(). But, the real problem, IMO, is the mysterious breaking of the camera while using camera_stop() (and therefore camera_getACK(), while using camera_set_servos). I really hope it's something really silly.