From 7a075a5dc99b8769061b197854af70aefccbdae8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Nov 2018 01:29:06 -0600 Subject: [PATCH] Tweak extruder errors --- Marlin/src/gcode/gcode.cpp | 5 ++--- Marlin/src/module/tool_change.cpp | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index bdb65a4a74..0124d7b049 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -65,9 +65,8 @@ int8_t GcodeSuite::get_target_extruder_from_command() { const int8_t e = parser.value_byte(); if (e >= EXTRUDERS) { SERIAL_ECHO_START(); - SERIAL_CHAR('M'); - SERIAL_ECHO(parser.codenum); - SERIAL_ECHOLNPAIR(" " MSG_INVALID_EXTRUDER " ", e); + SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); + SERIAL_ECHOLNPAIR(" " MSG_INVALID_EXTRUDER " ", int(e)); return -1; } return e; diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index b716c01925..da0d6afbf5 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -417,10 +417,8 @@ inline void invalid_extruder_error(const uint8_t e) { SERIAL_ECHO_START(); - SERIAL_CHAR('T'); - SERIAL_ECHO_F(e, DEC); - SERIAL_CHAR(' '); - SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER); + SERIAL_CHAR('T'); SERIAL_ECHO(int(e)); + SERIAL_CHAR(' '); SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER); } #if ENABLED(DUAL_X_CARRIAGE)