Browse Source

Tweak use of move_z_after_probing

Scott Lahteine 7 years ago
parent
commit
bc45fb6b13

+ 4
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -757,7 +757,10 @@
757 757
       } while (location.x_index >= 0 && --count);
758 758
 
759 759
       STOW_PROBE();
760
-      move_z_after_probing();
760
+
761
+      #if Z_AFTER_PROBING
762
+        move_z_after_probing();
763
+      #endif
761 764
 
762 765
       restore_ubl_active_state_and_leave();
763 766
 

+ 1
- 1
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -949,7 +949,7 @@ void GcodeSuite::G29() {
949 949
   if (planner.leveling_active)
950 950
     SYNC_PLAN_POSITION_KINEMATIC();
951 951
 
952
-  #if HAS_BED_PROBE
952
+  #if HAS_BED_PROBE && Z_AFTER_PROBING
953 953
     move_z_after_probing();
954 954
   #endif
955 955
 

+ 1
- 1
Marlin/src/gcode/calibrate/G28.cpp View File

@@ -310,7 +310,7 @@ void GcodeSuite::G28(const bool always_home_all) {
310 310
           HOMEAXIS(Z);
311 311
         #endif
312 312
       } // home_all || homeZ
313
-      #if HOMING_Z_WITH_PROBE
313
+      #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
314 314
         move_z_after_probing();
315 315
       #endif
316 316
     #endif // Z_HOME_DIR < 0

+ 3
- 1
Marlin/src/gcode/probe/G30.cpp View File

@@ -62,7 +62,9 @@ void GcodeSuite::G30() {
62 62
 
63 63
   clean_up_after_endstop_or_probe_move();
64 64
 
65
-  if (raise_after == PROBE_PT_STOW) move_z_after_probing();
65
+  #if Z_AFTER_PROBING
66
+    if (raise_after == PROBE_PT_STOW) move_z_after_probing();
67
+  #endif
66 68
 
67 69
   report_current_position();
68 70
 }

+ 3
- 1
Marlin/src/gcode/probe/M401_M402.cpp View File

@@ -41,7 +41,9 @@ void GcodeSuite::M401() {
41 41
  */
42 42
 void GcodeSuite::M402() {
43 43
   STOW_PROBE();
44
-  move_z_after_probing();
44
+  #if Z_AFTER_PROBING
45
+    move_z_after_probing();
46
+  #endif
45 47
   report_current_position();
46 48
 }
47 49
 

+ 1
- 1
Marlin/src/module/probe.cpp View File

@@ -465,7 +465,7 @@ bool set_probe_deployed(const bool deploy) {
465 465
   return false;
466 466
 }
467 467
 
468
-#ifdef Z_AFTER_PROBING
468
+#if Z_AFTER_PROBING
469 469
   // After probing move to a preferred Z position
470 470
   void move_z_after_probing() {
471 471
     if (current_position[Z_AXIS] != Z_AFTER_PROBING) {

+ 1
- 3
Marlin/src/module/probe.h View File

@@ -32,10 +32,8 @@
32 32
 #if HAS_BED_PROBE
33 33
   extern float zprobe_zoffset;
34 34
   bool set_probe_deployed(const bool deploy);
35
-  #ifdef Z_AFTER_PROBING
35
+  #if Z_AFTER_PROBING
36 36
     void move_z_after_probing();
37
-  #else
38
-    inline void move_z_after_probing() {}
39 37
   #endif
40 38
   enum ProbePtRaise : unsigned char {
41 39
     PROBE_PT_NONE,  // No raise or stow after run_z_probe

Loading…
Cancel
Save