浏览代码

Move G27 to cpp

Scott Lahteine 7 年前
父节点
当前提交
13136376ee
共有 3 个文件被更改,包括 13 次插入7 次删除
  1. 0
    4
      Marlin/src/Marlin.cpp
  2. 12
    1
      Marlin/src/gcode/feature/pause/G27.cpp
  3. 1
    2
      Marlin/src/gcode/gcode.cpp

+ 0
- 4
Marlin/src/Marlin.cpp 查看文件

@@ -357,10 +357,6 @@ void suicide() {
357 357
  ***************** GCode Handlers *****************
358 358
  **************************************************/
359 359
 
360
-#if ENABLED(NOZZLE_PARK_FEATURE)
361
-  #include "gcode/feature/pause/G27.h"
362
-#endif
363
-
364 360
 #if HAS_BED_PROBE
365 361
   #include "gcode/probe/G30.h"
366 362
   #if ENABLED(Z_PROBE_SLED)

Marlin/src/gcode/feature/pause/G27.h → Marlin/src/gcode/feature/pause/G27.cpp 查看文件

@@ -20,11 +20,22 @@
20 20
  *
21 21
  */
22 22
 
23
+
24
+#include "../../../inc/MarlinConfig.h"
25
+
26
+#if ENABLED(NOZZLE_PARK_FEATURE)
27
+
28
+#include "../../gcode.h"
29
+#include "../../../libs/nozzle.h"
30
+#include "../../../module/motion.h"
31
+
23 32
 /**
24 33
  * G27: Park the nozzle
25 34
  */
26
-void gcode_G27() {
35
+void GcodeSuite::G27() {
27 36
   // Don't allow nozzle parking without homing first
28 37
   if (axis_unhomed_error()) return;
29 38
   Nozzle::park(parser.ushortval('P'));
30 39
 }
40
+
41
+#endif // NOZZLE_PARK_FEATURE

+ 1
- 2
Marlin/src/gcode/gcode.cpp 查看文件

@@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
116 116
 //
117 117
 // Placeholders for non-migrated codes
118 118
 //
119
-extern void gcode_G27();
120 119
 extern void gcode_G30();
121 120
 extern void gcode_G31();
122 121
 extern void gcode_G32();
@@ -345,7 +344,7 @@ void GcodeSuite::process_next_command() {
345 344
 
346 345
       #if ENABLED(NOZZLE_PARK_FEATURE)
347 346
         case 27: // G27: Nozzle Park
348
-          gcode_G27();
347
+          G27();
349 348
           break;
350 349
       #endif // NOZZLE_PARK_FEATURE
351 350
 

正在加载...
取消
保存