View Single Post
  #2   Spotlight this post!  
Unread 09-02-2006, 01:05
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Search Servo Initialization Caution

Quote:
Originally Posted by Keith Watson
The default search code initializes the camera pan/tilt servos with this code.

Code:
 if(new_search == 1)
{
new_search = 0;
temp_pan_servo = 0;
temp_tilt_servo = Tracking_Config_Data.Tilt_Center_PWM;
 
}
else
{
// search code
}
PAN_SERVO = (unsigned char)temp_pan_servo;
TILT_SERVO = (unsigned char)temp_tilt_servo;
Note that the pan servo pwm is hardcoded to zero. If you have changed PAN_MIN_PWM_DEFAULT from zero to something else then hardcoding to zero is incorrect. Change the line to:
Code:
 temp_pan_servo = Tracking_Config_Data.Pan_Min_PWM;
Hmmm... I wonder what the heck I was thinking when I did that? Oh well, since I can't possibly explain this away as an undocumented "feature", I guess we have to call it a bug <grin>.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org