Kaynağa Gözat

Move M301 to cpp

Scott Lahteine 7 yıl önce
ebeveyn
işleme
609c4eea32

+ 0
- 4
Marlin/src/Marlin.cpp Dosyayı Görüntüle

352
   return false;
352
   return false;
353
 }
353
 }
354
 
354
 
355
-#if ENABLED(PIDTEMP)
356
-  #include "gcode/config/M301.h"
357
-#endif
358
-
359
 #if ENABLED(PIDTEMPBED)
355
 #if ENABLED(PIDTEMPBED)
360
   #include "gcode/config/M304.h"
356
   #include "gcode/config/M304.h"
361
 #endif
357
 #endif

Marlin/src/gcode/config/M301.h → Marlin/src/gcode/config/M301.cpp Dosyayı Görüntüle

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(PIDTEMP)
26
+
27
+#include "../gcode.h"
28
+#include "../../module/temperature.h"
29
+
23
 /**
30
 /**
24
  * M301: Set PID parameters P I D (and optionally C, L)
31
  * M301: Set PID parameters P I D (and optionally C, L)
25
  *
32
  *
32
  *   C[float] Kc term
39
  *   C[float] Kc term
33
  *   L[float] LPQ length
40
  *   L[float] LPQ length
34
  */
41
  */
35
-void gcode_M301() {
42
+void GcodeSuite::M301() {
36
 
43
 
37
   // multi-extruder PID patch: M301 updates or prints a single extruder's PID values
44
   // multi-extruder PID patch: M301 updates or prints a single extruder's PID values
38
   // default behaviour (omitting E parameter) is to update for extruder 0 only
45
   // default behaviour (omitting E parameter) is to update for extruder 0 only
67
     SERIAL_ERRORLN(MSG_INVALID_EXTRUDER);
74
     SERIAL_ERRORLN(MSG_INVALID_EXTRUDER);
68
   }
75
   }
69
 }
76
 }
77
+
78
+#endif // PIDTEMP

+ 2
- 5
Marlin/src/gcode/gcode.cpp Dosyayı Görüntüle

121
 extern void gcode_M165();
121
 extern void gcode_M165();
122
 extern void gcode_M240();
122
 extern void gcode_M240();
123
 extern void gcode_M250();
123
 extern void gcode_M250();
124
-extern void gcode_M301();
125
 extern void gcode_M302();
124
 extern void gcode_M302();
126
 extern void gcode_M304();
125
 extern void gcode_M304();
127
 extern void gcode_M350();
126
 extern void gcode_M350();
570
       #endif
569
       #endif
571
 
570
 
572
       #if ENABLED(PIDTEMP)
571
       #if ENABLED(PIDTEMP)
573
-        case 301: // M301: Set hotend PID parameters
574
-          gcode_M301();
575
-          break;
576
-      #endif // PIDTEMP
572
+        case 301: M301(); break;  // M301: Set hotend PID parameters
573
+      #endif
577
 
574
 
578
       #if ENABLED(PIDTEMPBED)
575
       #if ENABLED(PIDTEMPBED)
579
         case 304: // M304: Set bed PID parameters
576
         case 304: // M304: Set bed PID parameters

Loading…
İptal
Kaydet