083.16 fixed message return in a blank Gcode line

This commit is contained in:
alden.hart
2015-05-04 20:21:38 -04:00
parent ca71e237ac
commit 7cb20ccc0f
3 changed files with 10 additions and 9 deletions
+6 -5
View File
@@ -58,6 +58,12 @@ stat_t gcode_parser(char *block)
uint8_t block_delete_flag;
_normalize_gcode_block(str, &com, &msg, &block_delete_flag);
// queue a "(MSG" response
if (*msg != NUL) {
(void)cm_message(msg); // queue the message
}
if (str[0] == NUL) { // normalization returned null string
return (STAT_OK); // most likely a comment line
}
@@ -72,11 +78,6 @@ stat_t gcode_parser(char *block)
if (block_delete_flag == true) {
return (STAT_NOOP);
}
// queue a "(MSG" response
if (*msg != NUL) {
(void)cm_message(msg); // queue the message
}
return(_parse_gcode_block(block));
}