Implement CNC_COORDINATE_SYSTEMS

This commit is contained in:
Scott Lahteine
2017-11-04 16:36:41 -05:00
parent 1b42fba39b
commit 1b40e9c464
10 changed files with 242 additions and 33 deletions

View File

@@ -233,6 +233,26 @@ void GCodeParser::parse(char *p) {
}
}
#if ENABLED(CNC_COORDINATE_SYSTEMS)
// Parse the next parameter as a new command
bool GCodeParser::chain() {
#if ENABLED(FASTER_GCODE_PARSER)
char *next_command = command_ptr;
if (next_command) {
while (*next_command && *next_command != ' ') ++next_command;
while (*next_command == ' ') ++next_command;
if (!*next_command) next_command = NULL;
}
#else
const char *next_command = command_args;
#endif
if (next_command) parse(next_command);
return !!next_command;
}
#endif // CNC_COORDINATE_SYSTEMS
void GCodeParser::unknown_command_error() {
SERIAL_ECHO_START();
SERIAL_ECHOPAIR(MSG_UNKNOWN_COMMAND, command_ptr);