From 0bfa253b73f5718ccc633061b0d17d5938c19720 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Wed, 10 Apr 2024 15:15:24 -0400 Subject: [PATCH] Use getter --- Marlin/src/feature/e_parser.h | 3 +++ Marlin/src/gcode/host/M876.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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()); }