View Single Post
  #9   Spotlight this post!  
Unread 09-02-2006, 07:56
Gal Gal is offline
Registered User
FRC #1577
 
Join Date: Feb 2006
Location: Israel
Posts: 2
Gal is an unknown quantity at this point
Re: our own allternative code for the cmu camera

Quote:
Originally Posted by Calvin
If you cover up the camera, the xerror and yerror values turn 0... Camera stands still and nothing happens... as you uncover the camera it detects the light and does a little adjusting...
If you cover up the camera, it should start searching for the light. If you look in the 1577camera.c we supplied, in the search() function it says:

Code:
if (xerror != 0 && yerror != 0)
     track();
That means that if the xerror and yerror are NOT 0, the camera should track the light. If the xerror and yerror ARE 0, the camera should perform a search as written in the code.
I don't know why your camera doesn't perform that search but i know it should...
This code works for us very well, but maybe we should add an 'else' after that 'if'.
Anyway, are you sure you followed all of the instructions in the readme we made?
__________________
A proud member of #1577 SteamPunk from Raanana, Israel!

Last edited by Gal : 09-02-2006 at 08:14.