Merge pull request #6940 from Bob-the-Kuhn/Gcode---allow-XY
Gcode.cpp - spaces and parameters
This commit is contained in:
commit
fff50d3958
@ -184,6 +184,7 @@ void GCodeParser::parse(char *p) {
|
|||||||
|
|
||||||
if (PARAM_TEST) {
|
if (PARAM_TEST) {
|
||||||
|
|
||||||
|
while (*p == ' ') p++; // skip spaces vetween parameters & values
|
||||||
const bool has_num = DECIMAL_SIGNED(*p); // The parameter has a number [-+0-9.]
|
const bool has_num = DECIMAL_SIGNED(*p); // The parameter has a number [-+0-9.]
|
||||||
|
|
||||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||||
@ -220,9 +221,11 @@ void GCodeParser::parse(char *p) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*p && *p != ' ') p++; // Skip over the parameter
|
if (!WITHIN(*p, 'A', 'Z')) {
|
||||||
|
while (*p && NUMERIC(*p)) p++; // Skip over the value section of a parameter
|
||||||
while (*p == ' ') p++; // Skip over all spaces
|
while (*p == ' ') p++; // Skip over all spaces
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeParser::unknown_command_error() {
|
void GCodeParser::unknown_command_error() {
|
||||||
|
Loading…
Reference in New Issue
Block a user