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

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

949
   if (planner.leveling_active)
949
   if (planner.leveling_active)
950
     SYNC_PLAN_POSITION_KINEMATIC();
950
     SYNC_PLAN_POSITION_KINEMATIC();
951
 
951
 
952
-  #if HAS_BED_PROBE
952
+  #if HAS_BED_PROBE && Z_AFTER_PROBING
953
     move_z_after_probing();
953
     move_z_after_probing();
954
   #endif
954
   #endif
955
 
955
 

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

310
           HOMEAXIS(Z);
310
           HOMEAXIS(Z);
311
         #endif
311
         #endif
312
       } // home_all || homeZ
312
       } // home_all || homeZ
313
-      #if HOMING_Z_WITH_PROBE
313
+      #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
314
         move_z_after_probing();
314
         move_z_after_probing();
315
       #endif
315
       #endif
316
     #endif // Z_HOME_DIR < 0
316
     #endif // Z_HOME_DIR < 0

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

62
 
62
 
63
   clean_up_after_endstop_or_probe_move();
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
   report_current_position();
69
   report_current_position();
68
 }
70
 }

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

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

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

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

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

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

Loading…
Cancel
Save