Handle/strip leading whitespace in gcode stream
This commit is contained in:
parent
a4d427adf2
commit
9105573ac9
|
|
@ -419,15 +419,21 @@ void get_command()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if we don't receive 'N' but still see '*'
|
else
|
||||||
if (*(cmd_head != 'N') && (strchr(cmd_start, '*') != NULL))
|
|
||||||
{
|
{
|
||||||
SERIAL_ERROR_START;
|
// move cmd_start past all spaces
|
||||||
SERIAL_ERRORRPGM(_n("No Line Number with checksum, Last Line: "));////MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM
|
while (*cmd_start == ' ') ++cmd_start;
|
||||||
SERIAL_ERRORLN(gcode_LastN);
|
|
||||||
FlushSerialRequestResend();
|
// if we didn't receive 'N' but still see '*'
|
||||||
serial_count = 0;
|
if (strchr(cmd_start, '*') != NULL)
|
||||||
return;
|
{
|
||||||
|
SERIAL_ERROR_START;
|
||||||
|
SERIAL_ERRORRPGM(_n("No Line Number with checksum, Last Line: "));////MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM
|
||||||
|
SERIAL_ERRORLN(gcode_LastN);
|
||||||
|
FlushSerialRequestResend();
|
||||||
|
serial_count = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle KILL early, even when Stopped
|
// Handle KILL early, even when Stopped
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue