View Single Post
  #1   Spotlight this post!  
Unread 08-02-2006, 14:25
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
Search Servo Initialization Caution

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;
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.

Last edited by Keith Watson : 08-02-2006 at 14:39.