|
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'
|