Browse Source

Move G31_G32 to cpp

Scott Lahteine 7 years ago
parent
commit
b8adae0785
3 changed files with 13 additions and 10 deletions
  1. 0
    4
      Marlin/src/Marlin.cpp
  2. 2
    4
      Marlin/src/gcode/gcode.cpp
  3. 11
    2
      Marlin/src/gcode/probe/G31_G32.cpp

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

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

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

@@ -116,8 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
116 116
 //
117 117
 // Placeholders for non-migrated codes
118 118
 //
119
-extern void gcode_G31();
120
-extern void gcode_G32();
121 119
 extern void gcode_G38(bool is_38_2);
122 120
 extern void gcode_G42();
123 121
 extern void gcode_G92();
@@ -367,11 +365,11 @@ void GcodeSuite::process_next_command() {
367 365
         #if ENABLED(Z_PROBE_SLED)
368 366
 
369 367
             case 31: // G31: dock the sled
370
-              gcode_G31();
368
+              G31();
371 369
               break;
372 370
 
373 371
             case 32: // G32: undock the sled
374
-              gcode_G32();
372
+              G32();
375 373
               break;
376 374
 
377 375
         #endif // Z_PROBE_SLED

Marlin/src/gcode/probe/G31_G32.h → Marlin/src/gcode/probe/G31_G32.cpp View File

@@ -20,12 +20,21 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(Z_PROBE_SLED)
26
+
27
+#include "../gcode.h"
28
+#include "../../module/probe.h"
29
+
23 30
 /**
24 31
  * G31: Deploy the Z probe
25 32
  */
26
-void gcode_G31() { DEPLOY_PROBE(); }
33
+void GcodeSuite::G31() { DEPLOY_PROBE(); }
27 34
 
28 35
 /**
29 36
  * G32: Stow the Z probe
30 37
  */
31
-void gcode_G32() { STOW_PROBE(); }
38
+void GcodeSuite::G32() { STOW_PROBE(); }
39
+
40
+#endif // Z_PROBE_SLED

Loading…
Cancel
Save