Thread: Jog Command
View Single Post
Old 04-09-2004, 04:41 AM   #5
Dre
Member
 
Join Date: Jun 2002
Location: the Netherlands
Posts: 65
Dre is on a distinguished road
I can understand the o is giving problems as you break from the switch but you don't do anything with it.

I wonder what your specs really are, what do you want to achieve?

If you want them to set a path and then walk that path you have to call move_char a couple of times either here (which will make it really quick) or in update.c or something similar.

But seems to me you need to think up how you want to parse the buffer first. I'd read in the buffer for numbers till I find a char. Put any numbers you find in a buffer and then you get the char, you start moving the char. Then when you are done moving it X times then parse the next part etc.

When you get to the character open you read the next char for direction open the door and then continue parsing. Perhaps you also want to make a check if a door really opened or after finding one direction in error that the function will stop parsing as the rest of the path will most likely be void as well.

Greetings,
Dre is offline   Reply With Quote