View Single Post
  #24   Spotlight this post!  
Unread 09-04-2006, 13:13
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC autonomous modes

Quote:
Originally Posted by lynca
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
Pretty good advice if not using EasyC, which is what this discussion is about.