Browse Source

Fix M112 with Emergency Parser

Scott Lahteine 4 years ago
parent
commit
79c2f05e7d

+ 1
- 0
Marlin/src/MarlinCore.cpp View File

@@ -182,6 +182,7 @@
182 182
 #endif
183 183
 
184 184
 const char NUL_STR[] PROGMEM = "",
185
+           M112_KILL_STR[] PROGMEM = "M112 Shutdown",
185 186
            G28_STR[] PROGMEM = "G28",
186 187
            M21_STR[] PROGMEM = "M21",
187 188
            M23_STR[] PROGMEM = "M23 %s",

+ 1
- 1
Marlin/src/MarlinCore.h View File

@@ -120,5 +120,5 @@ void protected_pin_err();
120 120
   void event_probe_failure();
121 121
 #endif
122 122
 
123
-extern const char NUL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[],
123
+extern const char NUL_STR[], M112_KILL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[],
124 124
                   SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[];

+ 1
- 1
Marlin/src/gcode/control/M108_M112_M410.cpp View File

@@ -41,7 +41,7 @@ void GcodeSuite::M108() {
41 41
  * M112: Full Shutdown
42 42
  */
43 43
 void GcodeSuite::M112() {
44
-  kill(PSTR("M112 Shutdown"), nullptr, true);
44
+  kill(M112_KILL_STR, nullptr, true);
45 45
 }
46 46
 
47 47
 /**

+ 1
- 1
Marlin/src/gcode/queue.cpp View File

@@ -440,7 +440,7 @@ void GCodeQueue::get_serial_commands() {
440 440
               wait_for_user = false;
441 441
             #endif
442 442
           }
443
-          if (strcmp(command, "M112") == 0) kill();
443
+          if (strcmp(command, "M112") == 0) kill(M112_KILL_STR, nullptr, true);
444 444
           if (strcmp(command, "M410") == 0) quickstop_stepper();
445 445
         #endif
446 446
 

Loading…
Cancel
Save