View Single Post
  #2   Spotlight this post!  
Unread 22-02-2005, 10:58
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Delay in autonomous mode

Quote:
Originally Posted by SpeakerSilenced
Is there a simple way of delaying in autonomous mode?
At the top of your user_routines_fast.c:

Code:
static unsigned int sleeper = 0;
Where you want to delay:

Code:
if (sleeper > ???)
{
     /* code you want delayed */
}
else
     sleeper++;
For a simple autonomous mode, usually you structure your autonomous mode with a "switch/case" control block to seperate the different "sections" of your autonomous program. If you're doing this, make one of your sections the above delay, and under "code you want delayed" you place the code that moves you to your next "section".

-SlimBoJones...