View Single Post
  #2   Spotlight this post!  
Unread 09-02-2007, 10:37
jdejoannis jdejoannis is offline
Registered User
FRC #1845
 
Join Date: Feb 2006
Location: Atlanta,GA
Posts: 48
jdejoannis will become famous soon enoughjdejoannis will become famous soon enough
Re: No Tracking During Autonomous

Quote:
Originally Posted by Alan Anderson View Post
To receive data from the camera, you have to call Camera_Handler(). To make the camera servos track the light, you have to call Servo_Track(). Add those two lines to the User_Autonomous_Code() function, immediately after the call to Getdata(&rxdata).
Thanks, I will try this. But I don't fully understand. After all, Process_Data_From_uP, which currently does the handling and tracking, is executed at every step regardless of mode. Why then do handling and tracking stop during autonomous mode? Oh wait! I see it now. That while loop in the User_Autonomous_Code causes it to remain there until the period is over.

Quote:
In any code file where you want to use printf(), you need to #include <stdio.h> at the top of the file. The camera code doesn't do that for user_routines_fast.c, so you'll have to add it yourself.
Oops, I overlooked that even when I #included the camera and tracking headers. Good stuff!