View Single Post
  #5   Spotlight this post!  
Unread 05-03-2006, 15:47
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Camera does not search in autonomous mode after reset

Quote:
Originally Posted by Uberbots
Hmm...
You know that section in the User_Autonomous_Code function, right before the "while (autonomous_mode)" loop (and right after all of the PWM values are reset)?
Our team had been experiencing problems with that, and so (in my hacking nature...) I had put the Initialize_Camera function in that section. I don't know why, but it helped, and now the camera always initializes when Autonomous mode starts (or is invoked).
That is the same section of code where I added
Code:
tracking_initialized = 0;
Quote:
Originally Posted by Uberbots
also, while you are executing the Autonomous loop, are you sure you are calling the function "Camera_Handler()"?
Yes. Our programmer found camera searching was not working in autonomous and he and I tracked down why and added both "Camera_Handler()" and "Servo_Track()".

The behavior I described as if the static initializers are not being called under certain conditions is also happening in the recent thread The 8.2 (or 8.3) Battery Voltage Bug.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.