The default pan servo is:
Code:
#define PAN_SERVO pwm01
Did you change this? Otherwise you are just changing PAN_SERVO.
Also, if your camera is not searching comment out the code you posted and get the camera working first. Search through the .c files for whatever pwm is your pan servo. Then note that it is assigned to at the top of Default_Routine() which needs to be commented out. Actually you would need to do this for both the pan and tilt servos.
We put our camera tracking to turret tracking code in a function called Turret_Tracking(). Then that function is called inside of Default_Routine(). We also call it in our autonomous code.