View Single Post
  #6   Spotlight this post!  
Unread 12-02-2005, 15:45
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: programming codewords

You would place them into an array and run a function that uses the array like so:
commands.h:
Code:
struct commands command_list[] = {
/*   Command			  parm 1	 parm 2   parm 3   */
{CMD_GYRO_BIAS,			   0,		0,	  0},
{CMD_WAIT_FOR_BUMP,		 100,		0,	  0},
{CMD_WAIT,				 1000,		0,	  0},
{CMD_TURN,	   -1571L,	  100,	  0},
{CMD_WAIT_FOR_BUMP,		 100,		0,	  0},
{CMD_WAIT,				 1000,		0,	  0},
{CMD_TURN,		1571,	  100,	  0},
{CMD_JUMP,					1,		0,	  0},
{NULL,						0,		0,	  0}
};
__________________
- from B B frank


Last edited by AIBob : 12-02-2005 at 15:54.