Skip to content

Commit

Permalink
⚡️ PIO filters for M117, M300 and M414 (MarlinFirmware#21972)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and thinkyhead committed May 29, 2021
1 parent d1502f7 commit 61f2bb1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,11 @@ class GcodeSuite {

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();
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/gcode/lcd/M117.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
*
*/

#include "../../inc/MarlinConfig.h"

#if HAS_STATUS_MESSAGE

#include "../gcode.h"
#include "../../lcd/marlinui.h"

Expand All @@ -34,3 +38,5 @@ void GcodeSuite::M117() {
ui.reset_status();

}

#endif // HAS_STATUS_MESSAGE
4 changes: 3 additions & 1 deletion ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ HAS_MENU_DELTA_CALIBRATE = src_filter=+<src/lcd/menu/menu_delta_ca
HAS_MENU_FILAMENT = src_filter=+<src/lcd/menu/menu_filament.cpp>
LCD_INFO_MENU = src_filter=+<src/lcd/menu/menu_info.cpp>
HAS_MENU_JOB_RECOVERY = src_filter=+<src/lcd/menu/menu_job_recovery.cpp>
HAS_MULTI_LANGUAGE = src_filter=+<src/lcd/menu/menu_language.cpp>
HAS_MULTI_LANGUAGE = src_filter=+<src/lcd/menu/menu_language.cpp> +<src/gcode/lcd/M414.cpp>
HAS_MENU_LED = src_filter=+<src/lcd/menu/menu_led.cpp>
HAS_MENU_MEDIA = src_filter=+<src/lcd/menu/menu_media.cpp>
HAS_MENU_MIXER = src_filter=+<src/lcd/menu/menu_mixer.cpp>
Expand Down Expand Up @@ -186,7 +186,9 @@ AUTO_REPORT_POSITION = src_filter=+<src/gcode/host/M154.cpp>
REPETIER_GCODE_M360 = src_filter=+<src/gcode/host/M360.cpp>
HAS_GCODE_M876 = src_filter=+<src/gcode/host/M876.cpp>
HAS_RESUME_CONTINUE = src_filter=+<src/gcode/lcd/M0_M1.cpp>
HAS_STATUS_MESSAGE = src_filter=+<src/gcode/lcd/M117.cpp>
HAS_LCD_CONTRAST = src_filter=+<src/gcode/lcd/M250.cpp>
HAS_BUZZER = src_filter=+<src/gcode/lcd/M300.cpp>
LCD_SET_PROGRESS_MANUALLY = src_filter=+<src/gcode/lcd/M73.cpp>
TOUCH_SCREEN_CALIBRATION = src_filter=+<src/gcode/lcd/M995.cpp>
ARC_SUPPORT = src_filter=+<src/gcode/motion/G2_G3.cpp>
Expand Down
3 changes: 3 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
-<src/gcode/host/M360.cpp>
-<src/gcode/host/M876.cpp>
-<src/gcode/lcd/M0_M1.cpp>
-<src/gcode/lcd/M117.cpp>
-<src/gcode/lcd/M250.cpp>
-<src/gcode/lcd/M300.cpp>
-<src/gcode/lcd/M414.cpp>
-<src/gcode/lcd/M73.cpp>
-<src/gcode/lcd/M995.cpp>
-<src/gcode/motion/G2_G3.cpp>
Expand Down

0 comments on commit 61f2bb1

Please sign in to comment.