diff --git a/Marlin/src/feature/e_parser.h b/Marlin/src/feature/e_parser.h index 78b5cf28ad..80088273aa 100644 --- a/Marlin/src/feature/e_parser.h +++ b/Marlin/src/feature/e_parser.h @@ -79,7 +79,7 @@ public: static void update(State &state, const uint8_t c); - static bool isEnabled() { return enabled;} + static bool isEnabled() { return enabled; } private: static bool enabled; diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 28f13310d8..df9802f9a1 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -591,11 +591,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 110: M110(); break; // M110: Set Current Line Number case 111: M111(); break; // M111: Set debug level - case 108: M108(); break; // M108: Cancel Waiting - case 112: M112(); break; // M112: Full Shutdown - case 410: M410(); break; // M410: Quickstop - Abort all the planned moves. + case 108: M108(); break; // M108: Cancel Waiting + case 112: M112(); break; // M112: Full Shutdown + case 410: M410(); break; // M410: Quickstop - Abort all the planned moves. #if ENABLED(HOST_PROMPT_SUPPORT) - case 876: M876(); break; // M876: Handle Host prompt responses + case 876: M876(); break; // M876: Handle Host prompt responses #endif #if ENABLED(HOST_KEEPALIVE_FEATURE) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index e2def83b23..84718f0a37 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -140,7 +140,7 @@ * M105 - Report current temperatures. * M106 - Set print fan speed. * M107 - Print fan off. - * M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. (Requires EMERGENCY_PARSER) + * M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. * M109 - S Wait for extruder current temp to reach target temp. ** Wait only when heating! ** * R Wait for extruder current temp to reach target temp. ** Wait for heating or cooling. ** * If AUTOTEMP is enabled, S B F. Exit autotemp by any M109 without F @@ -307,7 +307,7 @@ * M869 - Report position encoder module error. * * M871 - Print/reset/clear first layer temperature offset values. (Requires PTC_PROBE, PTC_BED, or PTC_HOTEND) - * M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT and not EMERGENCY_PARSER) + * M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT) * M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE) * M906 - Set or get motor current in milliamps using axis codes XYZE, etc. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660) * M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots) diff --git a/Marlin/src/gcode/host/M876.cpp b/Marlin/src/gcode/host/M876.cpp index 2e9157620a..9a5c4c52bf 100644 --- a/Marlin/src/gcode/host/M876.cpp +++ b/Marlin/src/gcode/host/M876.cpp @@ -36,8 +36,9 @@ */ void GcodeSuite::M876() { - if (TERN1(EMERGENCY_PARSER, emergency_parser.isEnabled()) && parser.seenval('S')) - hostui.handle_response((uint8_t)parser.value_int()); + if (TERN0(EMERGENCY_PARSER, emergency_parser.isEnabled())) return; + + if (parser.seenval('S')) hostui.handle_response((uint8_t)parser.value_int()); } diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 68b5846c2f..bac1fd257e 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -1013,7 +1013,9 @@ void CardReader::closefile(const bool store_location/*=false*/) { flag.saving = flag.logging = false; sdpos = 0; - TERN_(EMERGENCY_PARSER, emergency_parser.enable()); + #if DISABLED(SDCARD_READONLY) + TERN_(EMERGENCY_PARSER, emergency_parser.enable()); + #endif if (store_location) { // TODO: Store printer state, filename, position