Pārlūkot izejas kodu

Move M149 to cpp

Scott Lahteine 6 gadus atpakaļ
vecāks
revīzija
0c7ba52451

+ 0
- 4
Marlin/src/Marlin.cpp Parādīt failu

@@ -369,10 +369,6 @@ bool pin_is_protected(const int8_t pin) {
369 369
   return false;
370 370
 }
371 371
 
372
-#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
373
-  #include "gcode/units/M149.h"
374
-#endif
375
-
376 372
 #if HAS_POWER_SWITCH
377 373
   #include "gcode/control/M80.h"
378 374
 #endif

+ 1
- 4
Marlin/src/gcode/gcode.cpp Parādīt failu

@@ -131,7 +131,6 @@ extern void gcode_M118();
131 131
 extern void gcode_M119();
132 132
 extern void gcode_M120();
133 133
 extern void gcode_M121();
134
-extern void gcode_M149();
135 134
 extern void gcode_M150();
136 135
 extern void gcode_M163();
137 136
 extern void gcode_M164();
@@ -547,9 +546,7 @@ void GcodeSuite::process_next_command() {
547 546
       #endif
548 547
 
549 548
       #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
550
-        case 149: // M149: Set temperature units
551
-          gcode_M149();
552
-          break;
549
+        case 149: M149(); break;  // M149: Set temperature units
553 550
       #endif
554 551
 
555 552
       #if HAS_COLOR_LEDS

Marlin/src/gcode/units/M149.h → Marlin/src/gcode/units/M149.cpp Parādīt failu

@@ -20,11 +20,19 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
26
+
27
+#include "../gcode.h"
28
+
23 29
 /**
24 30
  * M149: Set temperature units
25 31
  */
26
-void gcode_M149() {
32
+void GcodeSuite::M149() {
27 33
        if (parser.seenval('C')) parser.set_input_temp_units(TEMPUNIT_C);
28 34
   else if (parser.seenval('K')) parser.set_input_temp_units(TEMPUNIT_K);
29 35
   else if (parser.seenval('F')) parser.set_input_temp_units(TEMPUNIT_F);
30 36
 }
37
+
38
+#endif // TEMPERATURE_UNITS_SUPPORT

Notiek ielāde…
Atcelt
Saglabāt