Browse Source

Move M145 to cpp

Scott Lahteine 6 years ago
parent
commit
cbf40f7ee9
3 changed files with 11 additions and 11 deletions
  1. 0
    4
      Marlin/src/Marlin.cpp
  2. 1
    6
      Marlin/src/gcode/gcode.cpp
  3. 10
    1
      Marlin/src/gcode/lcd/M145.cpp

+ 0
- 4
Marlin/src/Marlin.cpp View File

369
   return false;
369
   return false;
370
 }
370
 }
371
 
371
 
372
-#if ENABLED(ULTIPANEL)
373
-  #include "gcode/lcd/M145.h"
374
-#endif
375
-
376
 #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
372
 #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
377
   #include "gcode/units/M149.h"
373
   #include "gcode/units/M149.h"
378
 #endif
374
 #endif

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

131
 extern void gcode_M119();
131
 extern void gcode_M119();
132
 extern void gcode_M120();
132
 extern void gcode_M120();
133
 extern void gcode_M121();
133
 extern void gcode_M121();
134
-extern void gcode_M145();
135
 extern void gcode_M149();
134
 extern void gcode_M149();
136
 extern void gcode_M150();
135
 extern void gcode_M150();
137
 extern void gcode_M163();
136
 extern void gcode_M163();
544
         break;
543
         break;
545
 
544
 
546
       #if ENABLED(ULTIPANEL)
545
       #if ENABLED(ULTIPANEL)
547
-
548
-        case 145: // M145: Set material heatup parameters
549
-          gcode_M145();
550
-          break;
551
-
546
+        case 145: M145(); break;  // M145: Set material heatup parameters
552
       #endif
547
       #endif
553
 
548
 
554
       #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
549
       #if ENABLED(TEMPERATURE_UNITS_SUPPORT)

Marlin/src/gcode/lcd/M145.h → Marlin/src/gcode/lcd/M145.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(ULTIPANEL)
26
+
27
+#include "../gcode.h"
28
+#include "../../lcd/ultralcd.h"
29
+
23
 /**
30
 /**
24
  * M145: Set the heatup state for a material in the LCD menu
31
  * M145: Set the heatup state for a material in the LCD menu
25
  *
32
  *
28
  *   B<bed temp>
35
  *   B<bed temp>
29
  *   F<fan speed>
36
  *   F<fan speed>
30
  */
37
  */
31
-void gcode_M145() {
38
+void GcodeSuite::M145() {
32
   const uint8_t material = (uint8_t)parser.intval('S');
39
   const uint8_t material = (uint8_t)parser.intval('S');
33
   if (material >= COUNT(lcd_preheat_hotend_temp)) {
40
   if (material >= COUNT(lcd_preheat_hotend_temp)) {
34
     SERIAL_ERROR_START();
41
     SERIAL_ERROR_START();
52
     #endif
59
     #endif
53
   }
60
   }
54
 }
61
 }
62
+
63
+#endif // ULTIPANEL

Loading…
Cancel
Save