diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index b7d26ca4e4884ee2e05f9efb53c48dfc0bf301e1..a6bb262f8385b98f42a8b6e05fe9cd3bec04df40 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -182,6 +182,7 @@ #endif const char NUL_STR[] PROGMEM = "", + M112_KILL_STR[] PROGMEM = "M112 Shutdown", G28_STR[] PROGMEM = "G28", M21_STR[] PROGMEM = "M21", M23_STR[] PROGMEM = "M23 %s", diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index acc9a2a623bff2b36c0313e3171dace40d8eae7b..b7f1460ff880e0959d08383eb76faa13b79dd27b 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -120,5 +120,5 @@ void protected_pin_err(); void event_probe_failure(); #endif -extern const char NUL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[], +extern const char NUL_STR[], M112_KILL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[], SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[]; diff --git a/Marlin/src/gcode/control/M108_M112_M410.cpp b/Marlin/src/gcode/control/M108_M112_M410.cpp index e083dd0978c9b5977e1492034524937b52b793bf..606a39d51cee2c3067aea6aec66e4e9e308b48dd 100644 --- a/Marlin/src/gcode/control/M108_M112_M410.cpp +++ b/Marlin/src/gcode/control/M108_M112_M410.cpp @@ -41,7 +41,7 @@ void GcodeSuite::M108() { * M112: Full Shutdown */ void GcodeSuite::M112() { - kill(PSTR("M112 Shutdown"), nullptr, true); + kill(M112_KILL_STR, nullptr, true); } /** diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index a026e479a958513e506cc062650994272030dc28..ff35b553a8532729262ed5374e740bcca0959f0e 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -440,7 +440,7 @@ void GCodeQueue::get_serial_commands() { wait_for_user = false; #endif } - if (strcmp(command, "M112") == 0) kill(); + if (strcmp(command, "M112") == 0) kill(M112_KILL_STR, nullptr, true); if (strcmp(command, "M410") == 0) quickstop_stepper(); #endif