diff --git a/Marlin/src/feature/e_parser.h b/Marlin/src/feature/e_parser.h index 665dd708b8..78b5cf28ad 100644 --- a/Marlin/src/feature/e_parser.h +++ b/Marlin/src/feature/e_parser.h @@ -79,6 +79,9 @@ public: static void update(State &state, const uint8_t c); + static bool isEnabled() { return enabled;} + +private: static bool enabled; }; diff --git a/Marlin/src/gcode/host/M876.cpp b/Marlin/src/gcode/host/M876.cpp index 2a8a5fadd0..691a379434 100644 --- a/Marlin/src/gcode/host/M876.cpp +++ b/Marlin/src/gcode/host/M876.cpp @@ -35,7 +35,7 @@ * M876: Handle Prompt Response */ void GcodeSuite::M876() { - if(TERN1(EMERGENCY_PARSER, emergency_parser.enabled)) + if(TERN1(EMERGENCY_PARSER, emergency_parser.isEnabled())) if (parser.seenval('S')) hostui.handle_response((uint8_t)parser.value_int()); }