Browse Source

Move G27 to cpp

Scott Lahteine 8 years ago
parent
commit
13136376ee
3 changed files with 13 additions and 7 deletions
  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 View File

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

Marlin/src/gcode/feature/pause/G27.h → Marlin/src/gcode/feature/pause/G27.cpp View File

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
  * G27: Park the nozzle
33
  * G27: Park the nozzle
25
  */
34
  */
26
-void gcode_G27() {
35
+void GcodeSuite::G27() {
27
   // Don't allow nozzle parking without homing first
36
   // Don't allow nozzle parking without homing first
28
   if (axis_unhomed_error()) return;
37
   if (axis_unhomed_error()) return;
29
   Nozzle::park(parser.ushortval('P'));
38
   Nozzle::park(parser.ushortval('P'));
30
 }
39
 }
40
+
41
+#endif // NOZZLE_PARK_FEATURE

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

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

Loading…
Cancel
Save