Sfoglia il codice sorgente

⚡️ PIO filters for M117, M300 and M414 (#21972)

ellensp 3 anni fa
parent
commit
731370051d
Nessun account collegato all'indirizzo email del committer

+ 3
- 1
Marlin/src/gcode/gcode.cpp Vedi File

@@ -605,7 +605,9 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
605 605
       case 92: M92(); break;                                      // M92: Set the steps-per-unit for one or more axes
606 606
       case 114: M114(); break;                                    // M114: Report current position
607 607
       case 115: M115(); break;                                    // M115: Report capabilities
608
-      case 117: M117(); break;                                    // M117: Set LCD message text, if possible
608
+
609
+      case 117: TERN_(HAS_STATUS_MESSAGE, M117()); break;         // M117: Set LCD message text, if possible
610
+
609 611
       case 118: M118(); break;                                    // M118: Display a message in the host console
610 612
       case 119: M119(); break;                                    // M119: Report endstop states
611 613
       case 120: M120(); break;                                    // M120: Enable endstops

+ 5
- 1
Marlin/src/gcode/gcode.h Vedi File

@@ -678,7 +678,11 @@ private:
678 678
 
679 679
   static void M114();
680 680
   static void M115();
681
-  static void M117();
681
+
682
+  #if HAS_STATUS_MESSAGE
683
+    static void M117();
684
+  #endif
685
+
682 686
   static void M118();
683 687
   static void M119();
684 688
   static void M120();

+ 6
- 0
Marlin/src/gcode/lcd/M117.cpp Vedi File

@@ -20,6 +20,10 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if HAS_STATUS_MESSAGE
26
+
23 27
 #include "../gcode.h"
24 28
 #include "../../lcd/marlinui.h"
25 29
 
@@ -34,3 +38,5 @@ void GcodeSuite::M117() {
34 38
     ui.reset_status();
35 39
 
36 40
 }
41
+
42
+#endif // HAS_STATUS_MESSAGE

+ 3
- 1
ini/features.ini Vedi File

@@ -61,7 +61,7 @@ HAS_MENU_DELTA_CALIBRATE               = src_filter=+<src/lcd/menu/menu_delta_ca
61 61
 HAS_MENU_FILAMENT                      = src_filter=+<src/lcd/menu/menu_filament.cpp>
62 62
 LCD_INFO_MENU                          = src_filter=+<src/lcd/menu/menu_info.cpp>
63 63
 HAS_MENU_JOB_RECOVERY                  = src_filter=+<src/lcd/menu/menu_job_recovery.cpp>
64
-HAS_MULTI_LANGUAGE                     = src_filter=+<src/lcd/menu/menu_language.cpp>
64
+HAS_MULTI_LANGUAGE                     = src_filter=+<src/lcd/menu/menu_language.cpp> +<src/gcode/lcd/M414.cpp>
65 65
 HAS_MENU_LED                           = src_filter=+<src/lcd/menu/menu_led.cpp>
66 66
 HAS_MENU_MEDIA                         = src_filter=+<src/lcd/menu/menu_media.cpp>
67 67
 HAS_MENU_MIXER                         = src_filter=+<src/lcd/menu/menu_mixer.cpp>
@@ -186,7 +186,9 @@ AUTO_REPORT_POSITION                   = src_filter=+<src/gcode/host/M154.cpp>
186 186
 REPETIER_GCODE_M360                    = src_filter=+<src/gcode/host/M360.cpp>
187 187
 HAS_GCODE_M876                         = src_filter=+<src/gcode/host/M876.cpp>
188 188
 HAS_RESUME_CONTINUE                    = src_filter=+<src/gcode/lcd/M0_M1.cpp>
189
+HAS_STATUS_MESSAGE                     = src_filter=+<src/gcode/lcd/M117.cpp>
189 190
 HAS_LCD_CONTRAST                       = src_filter=+<src/gcode/lcd/M250.cpp>
191
+HAS_BUZZER                             = src_filter=+<src/gcode/lcd/M300.cpp>
190 192
 LCD_SET_PROGRESS_MANUALLY              = src_filter=+<src/gcode/lcd/M73.cpp>
191 193
 TOUCH_SCREEN_CALIBRATION               = src_filter=+<src/gcode/lcd/M995.cpp>
192 194
 ARC_SUPPORT                            = src_filter=+<src/gcode/motion/G2_G3.cpp>

+ 3
- 0
platformio.ini Vedi File

@@ -202,7 +202,10 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
202 202
   -<src/gcode/host/M360.cpp>
203 203
   -<src/gcode/host/M876.cpp>
204 204
   -<src/gcode/lcd/M0_M1.cpp>
205
+  -<src/gcode/lcd/M117.cpp>
205 206
   -<src/gcode/lcd/M250.cpp>
207
+  -<src/gcode/lcd/M300.cpp>
208
+  -<src/gcode/lcd/M414.cpp>
206 209
   -<src/gcode/lcd/M73.cpp>
207 210
   -<src/gcode/lcd/M995.cpp>
208 211
   -<src/gcode/motion/G2_G3.cpp>

Loading…
Annulla
Salva