View Single Post
  #6   Spotlight this post!  
Unread 22-01-2005, 21:38
iscrc2 iscrc2 is offline
Registered User
#0568 (Nerds of the North)
 
Join Date: Jan 2002
Location: Anchorage, Alaska
Posts: 28
iscrc2 is an unknown quantity at this point
Re: Can anyone create new commands?

yes you can 'define' new commands to place in the command.h

in robot.h around line 169 insert new lines that name a command and give a function prototype

in robot.c around line 156 insert new lines that will act on the new command
(it would look almost exactly like the CMD_KEEP_HEADING block just before it)

at the end of robot.c add the function you gave a prototype to in robot.h
(you might use the command state structure the other commands use: START, IN_PROGRESS, COMPLETE) don't forget to return a 1 else it will get stuck on that command.

Then you can use your new command in the command.h 'script'