View Single Post
  #2   Spotlight this post!  
Unread 19-01-2005, 22:05
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 750
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Multiple command_lists

Quote:
Originally Posted by Jon236
In the Navigation code I downloaded, it is apparent that the command_list data structure contained in commands.h provides a list of actions for the robot to accomplish. Using robot_command(), one can call this from either the autonomous or the manual mode. But how can we create multiple lists of commands to be used from various autonomous programs? Can we re-create the data structure in different iterations in a .c file?

Kevin, I would feel a lot better if you moved a little farther from the cliff!


Jon Mittelman
Team 236 Mentor

If it was me, we have used thumb wheels in the form of binary input to some digital I/O. So we work out which program we are going to run before the match starts, set the thumb wheel to select the program we want to run. In code it sort of looks like this:

Code:
if (thumb_wheel = 1)
	{
	do these commands;
	do these commands;
	do these commands;
	do these commands;
	}


if (thumb_wheel = 2)
	{
	do these commands;
	do these commands;
	do these commands;
	do these commands;
	}

if (thumb_wheel = 3)
	{
	do these commands;
	do these commands;
	do these commands;
	do these commands;
	}
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369