Skip to content

Commit

Permalink
Fix M112 with Emergency Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 20, 2020
1 parent 4dca6d5 commit 79c2f05
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/MarlinCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
2 changes: 1 addition & 1 deletion Marlin/src/gcode/control/M108_M112_M410.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 79c2f05

Please sign in to comment.