Go to Post Might change next year. Read the manual then too. - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 20-01-2005, 15:58
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Multiple command_lists

What I did was redid the code so that it accessed a pointer to the array, than made that pointer an argument:

Code:
struct commands *command_list;
//...
void robot_control(struct commands *script)
{
robot_command(script);
robot_timer();
robot_position();
}

void robot_command(struct commands *script)
{
//...
}
Of course, I also macro'ed access to the elements in the array, which makes such changes easy:
Code:
#define GET_COMMAND(index) command_list[(index)]
#define CUR_COMMAND GET_COMMAND(current_command)
#define COMMAND CUR_COMMAND.command
#define PARAM1 CUR_COMMAND.parm_1
#define PARAM2 CUR_COMMAND.parm_2
#define PARAM3 CUR_COMMAND.parm_3
So my autonomous mode is now:
Code:
    robot_control(default_script);
After you set all of this up, you can easily add something to select which mode.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
White Paper Discuss: Operator Interface - Userbyte Multiple Displays Variables marccenter Extra Discussion 0 02-12-2004 14:56
Multiple version of Inventor on one computer sanddrag Inventor 4 30-11-2004 13:31
Remember that thread? [11-11-04]: Multiple Regionals Ken Leung General Forum 5 11-11-2004 16:53
Multiple teams from one high school? KathieK General Forum 24 28-06-2004 16:30
Multiple Motors phrontist Motors 12 21-06-2004 23:05


All times are GMT -5. The time now is 01:40.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi