gcode_parse.c: don't assume G1 on pure M- or T-codes.

Offending code were lines like these from Repetier Host:

  N8965 M117 ETE 29m 10s *86

When firmware received not-G command (M-command or T-command) with X, Y,
Z, E or F coordinate, it will "change" this command to G1.
Now, firmware do change only if received line is not either G- or M-
or T-command.

Examples:
X10 - is changed to G1 X10
E20 F300 - is changed to G1 E20 F300
M117 E1 - is NOT changed to G1 E1

This commit costs 6 bytes binary size.
This commit is contained in:
konoppo 2015-01-06 00:47:27 +01:00 committed by Markus Hitter
parent cca2994dd8
commit a0125dedfc
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ void gcode_parse_char(uint8_t c) {
serial_writechar(c);
// Assume G1 for unspecified movements.
if ( ! next_target.seen_G &&
if ( ! next_target.seen_G && ! next_target.seen_M && ! next_target.seen_T &&
(next_target.seen_X || next_target.seen_Y || next_target.seen_Z ||
next_target.seen_E || next_target.seen_F)) {
next_target.seen_G = 1;