View Single Post
  #23   Spotlight this post!  
Unread 09-04-2006, 11:24
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: EasyC autonomous modes

When configuring globals to be either on or off (i.e. only two conditions) such as the "isEnabled" global mentioned above. You might want to instead use a

#define ISENABLED 1 // instead of defining a global

//later in the program put
#ifdef ISENABLED
//put autonomous code here
#endif

This page is a good tutorial on using MACROS, http://vergil.chemistry.gatech.edu/r...al/basic2.html
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter

Last edited by lynca : 09-04-2006 at 11:27.