Thanks for the help. Just for testing, we tried using the tilt servo value to get it to stop. This is our code:
Quote:
if (Get_Tracking_State() == CAMERA_ON_TARGET)
{
if ((int) TILT_SERVO < 170)
{
pwm13 = pwm14 = 104;
pwm15 = pwm16 = 157;
}
else if ((int) TILT_SERVO > 170)
{
pwm13 = pwm14 = pwm15 = pwm16 = 127;
}
}
else if (Get_Tracking_State() == SEARCHING)
{
pwm13 = pwm14 = pwm15 = pwm16 = 127;
}
|
However, the robot continues to drive forward. The camera seems to stop moving once we initiate autonomous mode. We have these three functions, Servo_Track(); Camera_Handler(); and Tracking_Info_Terminal();, called right after Getdata(&rxdata);.