View Single Post
  #2   Spotlight this post!  
Unread 09-01-2004, 19:07
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Re: Multiple programs/autonomous routines

Personally, I would have a set of functions

//auton check
int program = 0;
//bit shift digital inputs to program var
doAutonomous(program);
//auton check


//misc funcs
#define REGULAR_AUTON 0

void doAutonomous(int program)
{
if (program == REGULAR_AUTON) regular_auton();
else if...
}

void regular_auton()
{
// blah regular auton
}
__________________
R