diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 5ee1ba6b4f..9088407f81 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -126,16 +126,13 @@ void GcodeSuite::say_units() { * Return -1 if the T parameter is out of range */ int8_t GcodeSuite::get_target_extruder_from_command() { - #if HAS_TOOLCHANGE - if (parser.seenval('T')) { - const int8_t e = parser.value_byte(); - if (e < EXTRUDERS) return e; - SERIAL_ECHO_START(); - SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); - SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e); - return -1; - } - #endif + if (parser.seenval('T')) { + const int8_t e = parser.value_byte(); + if (e < EXTRUDERS) return e; + SERIAL_ECHO_START(); + SERIAL_ECHOLN(C('M'), parser.codenum, F(" " STR_INVALID_EXTRUDER " "), e); + return -1; + } return active_extruder; } @@ -151,7 +148,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command(const int8_t dval/*=-1*/) { if (dval == -2) return dval; SERIAL_ECHO_START(); - SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); + SERIAL_ECHO(C('M'), parser.codenum); if (e == -1) SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED); else