Quote:
Originally Posted by whitetiger0990
Code:
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{ /* I'm slow! I only execute every 26.2ms because */
/* that's how fast the Master uP gives me data. */
Process_Data_From_Master_uP(); /* You edit this in user_routines.c */
if (autonomous_mode) /* DO NOT CHANGE! */
{
User_Autonomous_Code(); /* You edit this in user_routines_fast.c */
}
}
Stuff in Process_Data_From_Master_uP() will be run every 26.2ms. Same with User_Autonomous_Code() (when the robot is in autonomous).
It doesn't vary much to matter, if you have code that makes it take longer than 26.2ms to run it, it will explode.
|
Thanks! Thats exactly what i was looking for... I thought i had seen that in the code before but when i went to look for it i couldn't find it