From 731370051de73ad4c92d60ec01563def3da53ddb Mon Sep 17 00:00:00 2001 From: ellensp Date: Mon, 24 May 2021 13:29:19 +1200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20PIO=20filters=20for=20M117?= =?UTF-8?q?,=20M300=20and=20M414=20(#21972)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/gcode.cpp | 4 +++- Marlin/src/gcode/gcode.h | 6 +++++- Marlin/src/gcode/lcd/M117.cpp | 6 ++++++ ini/features.ini | 4 +++- platformio.ini | 3 +++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index fa4682c082..29dbf8d1c2 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -605,7 +605,9 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes case 114: M114(); break; // M114: Report current position case 115: M115(); break; // M115: Report capabilities - case 117: M117(); break; // M117: Set LCD message text, if possible + + case 117: TERN_(HAS_STATUS_MESSAGE, M117()); break; // M117: Set LCD message text, if possible + case 118: M118(); break; // M118: Display a message in the host console case 119: M119(); break; // M119: Report endstop states case 120: M120(); break; // M120: Enable endstops diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 6f8568730b..befc328bb9 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -678,7 +678,11 @@ private: static void M114(); static void M115(); - static void M117(); + + #if HAS_STATUS_MESSAGE + static void M117(); + #endif + static void M118(); static void M119(); static void M120(); diff --git a/Marlin/src/gcode/lcd/M117.cpp b/Marlin/src/gcode/lcd/M117.cpp index 59305d94c5..f26694bd64 100644 --- a/Marlin/src/gcode/lcd/M117.cpp +++ b/Marlin/src/gcode/lcd/M117.cpp @@ -20,6 +20,10 @@ * */ +#include "../../inc/MarlinConfig.h" + +#if HAS_STATUS_MESSAGE + #include "../gcode.h" #include "../../lcd/marlinui.h" @@ -34,3 +38,5 @@ void GcodeSuite::M117() { ui.reset_status(); } + +#endif // HAS_STATUS_MESSAGE diff --git a/ini/features.ini b/ini/features.ini index 2b69daa88a..89df3b99fe 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -61,7 +61,7 @@ HAS_MENU_DELTA_CALIBRATE = src_filter=+ LCD_INFO_MENU = src_filter=+ HAS_MENU_JOB_RECOVERY = src_filter=+ -HAS_MULTI_LANGUAGE = src_filter=+ +HAS_MULTI_LANGUAGE = src_filter=+ + HAS_MENU_LED = src_filter=+ HAS_MENU_MEDIA = src_filter=+ HAS_MENU_MIXER = src_filter=+ @@ -186,7 +186,9 @@ AUTO_REPORT_POSITION = src_filter=+ REPETIER_GCODE_M360 = src_filter=+ HAS_GCODE_M876 = src_filter=+ HAS_RESUME_CONTINUE = src_filter=+ +HAS_STATUS_MESSAGE = src_filter=+ HAS_LCD_CONTRAST = src_filter=+ +HAS_BUZZER = src_filter=+ LCD_SET_PROGRESS_MANUALLY = src_filter=+ TOUCH_SCREEN_CALIBRATION = src_filter=+ ARC_SUPPORT = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 0516149da9..b552eda81d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -202,7 +202,10 @@ default_src_filter = + - - + - - - + - - + - + - - - -