
Re: Switching between RC and autonomous
You can do this a couple of different ways, but I like to use multitasking to do it. Check out this forum post on multitasking:
viewtopic.php?f=11&t=3341You can write your manual joystick controls as one task, and your autonomous as a second task. Then use task main to simply start/stop the tasks as you wish. For example:
if (vexRT[Btn5U] == 1)
{
stopTask (joydrive);
startTask (autodrive);
}
if (vexRT[Btn6D] == 1)
{
stopTask (autodrive);
startTask (joydrive);
}
Put that into a while loop, and you'll be all set.
Good luck!