Quote:
|
Originally Posted by lasindi
Thanks a lot for the help with the boolean variables. Could someone answer my question about using the autonomous_mode macro?
|
Where to put your auto code:
Code:
/*******************************************************************************
*
* FUNCTION: User_Autonomous_Code()
*
* PURPOSE: Executes user's code during autonomous robot operation.
* You should modify this routine by adding code which you
* wish to run in autonomous mode. This executes every 26.2ms.
*
* CALLED FROM: main.c/main()
*
* PARAMETERS: None
*
* RETURNS: Nothing
*
*******************************************************************************/
void User_Autonomous_Code(void)
{
while(autonomous_mode)
{
if(statusflag.NEW_SPI_DATA)
{
Getdata(&rxdata); // bad things will happen if you move or delete this
// autonomous code goes here
Putdata(&txdata); //even more bad things will happen if you mess with this
}
}
}