Browse Source

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

ellensp 3 years ago
parent
commit
731370051d
No account linked to committer's email address
5 changed files with 20 additions and 3 deletions
  1. 3
    1
      Marlin/src/gcode/gcode.cpp
  2. 5
    1
      Marlin/src/gcode/gcode.h
  3. 6
    0
      Marlin/src/gcode/lcd/M117.cpp
  4. 3
    1
      ini/features.ini
  5. 3
    0
      platformio.ini

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

605
       case 92: M92(); break;                                      // M92: Set the steps-per-unit for one or more axes
605
       case 92: M92(); break;                                      // M92: Set the steps-per-unit for one or more axes
606
       case 114: M114(); break;                                    // M114: Report current position
606
       case 114: M114(); break;                                    // M114: Report current position
607
       case 115: M115(); break;                                    // M115: Report capabilities
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
       case 118: M118(); break;                                    // M118: Display a message in the host console
611
       case 118: M118(); break;                                    // M118: Display a message in the host console
610
       case 119: M119(); break;                                    // M119: Report endstop states
612
       case 119: M119(); break;                                    // M119: Report endstop states
611
       case 120: M120(); break;                                    // M120: Enable endstops
613
       case 120: M120(); break;                                    // M120: Enable endstops

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

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

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

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if HAS_STATUS_MESSAGE
26
+
23
 #include "../gcode.h"
27
 #include "../gcode.h"
24
 #include "../../lcd/marlinui.h"
28
 #include "../../lcd/marlinui.h"
25
 
29
 
34
     ui.reset_status();
38
     ui.reset_status();
35
 
39
 
36
 }
40
 }
41
+
42
+#endif // HAS_STATUS_MESSAGE

+ 3
- 1
ini/features.ini View File

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

+ 3
- 0
platformio.ini View File

202
   -<src/gcode/host/M360.cpp>
202
   -<src/gcode/host/M360.cpp>
203
   -<src/gcode/host/M876.cpp>
203
   -<src/gcode/host/M876.cpp>
204
   -<src/gcode/lcd/M0_M1.cpp>
204
   -<src/gcode/lcd/M0_M1.cpp>
205
+  -<src/gcode/lcd/M117.cpp>
205
   -<src/gcode/lcd/M250.cpp>
206
   -<src/gcode/lcd/M250.cpp>
207
+  -<src/gcode/lcd/M300.cpp>
208
+  -<src/gcode/lcd/M414.cpp>
206
   -<src/gcode/lcd/M73.cpp>
209
   -<src/gcode/lcd/M73.cpp>
207
   -<src/gcode/lcd/M995.cpp>
210
   -<src/gcode/lcd/M995.cpp>
208
   -<src/gcode/motion/G2_G3.cpp>
211
   -<src/gcode/motion/G2_G3.cpp>

Loading…
Cancel
Save