Kevin's camera state handler (Camera_Handler(), I believe) wants to be called in the "slow loop" (every 26.2 ms). It counts how many times it has been called to determine how long it has been to determine if a time-out condition has occurred. Make sure your code is calling Camera_Handler() only when there is new data:
Code:
while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */
/* Add your own autonomous code here. */
Camera_Handler();
Servo_Track();
///////////////////////////////////////////
//Add whatever code you want here.//
///////////////////////////////////////////
Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}
}
Also, uncomment the #define for _DEBUG in camera.h and see what you get in the terminal window when you turn on auton. You should see either the initialization like you would in user mode, or tracking packets (that might only apply to Kevin's "Bells and Whistles" version; not sure).
JBot