Did you try inserting printfs for the joystick values (including buttons), to make sure the robot is getting the joystick input?
printf("%d\t%d\t%d\t%d\n", p1_y, p2_y, p2_sw_trig, p2_sw_top);
Is everything plugged in (the motors)?
I'm not sure if it was a problem with copying, but there's no ending curly brace for Default_Routine.
Oh, also, a few other things, that probably aren't causing your problem, but might cause other problems:
(In the code, I changed all "x == 1" to just "x" and "x == 0" to just "!x". It's still exactly the same.)
Code:
if (p2_sw_trig)
{
pwm06 = p2_x / 4; //pan
pwm07 = p2_y / 4; //tilt
}
That will cause PWMs 6 and 7 to always have a value from 0 to 64, depending on the joystick value (0 to 255). Never mind if that's what you were trying to do.
Code:
if (!p2_sw_top)
{
//some code here...
}
else
{
//more code...
}
if (p2_sw_top)
{
//even more code...
}
If you're pressing down p2_sw_top, both what is in the else and what is in the if (p2_sw_top) will execute. This probably won't cause problems, but it's just sort of redundant.