Allow M110 to handle a second N argument

This commit is contained in:
Scott Lahteine 2015-06-23 17:50:09 -07:00 committed by Richard Wackerbarth
parent d135b15bb8
commit 30976f9773

View File

@ -791,8 +791,17 @@ void get_command() {
char *npos = strchr(command, 'N'); char *npos = strchr(command, 'N');
char *apos = strchr(command, '*'); char *apos = strchr(command, '*');
if (npos) { if (npos) {
boolean M110 = strstr_P(command, PSTR("M110")) != NULL;
if (M110) {
char *n2pos = strchr(command + 4, 'N');
if (n2pos) npos = n2pos;
}
gcode_N = strtol(npos + 1, NULL, 10); gcode_N = strtol(npos + 1, NULL, 10);
if (gcode_N != gcode_LastN + 1 && strstr_P(command, PSTR("M110")) == NULL) {
if (!M110 && gcode_N != gcode_LastN + 1) {
gcode_line_error(PSTR(MSG_ERR_LINE_NO)); gcode_line_error(PSTR(MSG_ERR_LINE_NO));
return; return;
} }