Browse Source

One fewer function call in probe_pt

Scott Lahteine 7 years ago
parent
commit
80ada58818
1 changed files with 11 additions and 8 deletions
  1. 11
    8
      Marlin/src/module/probe.cpp

+ 11
- 8
Marlin/src/module/probe.cpp View File

@@ -594,17 +594,20 @@ float probe_pt(const float &rx, const float &ry, const bool stow, const uint8_t
594 594
     : !position_is_reachable_by_probe(rx, ry)
595 595
   ) return NAN;
596 596
 
597
-  const float old_feedrate_mm_s = feedrate_mm_s;
598
-
599
-  #if ENABLED(DELTA)
600
-    if (current_position[Z_AXIS] > delta_clip_start_height)
601
-      do_blocking_move_to_z(delta_clip_start_height);
602
-  #endif
597
+  const float nz = 
598
+    #if ENABLED(DELTA)
599
+      // Move below clip height or xy move will be aborted by do_blocking_move_to
600
+      min(current_position[Z_AXIS], delta_clip_start_height)
601
+    #else
602
+      current_position[Z_AXIS]
603
+    #endif
604
+  ;
603 605
 
606
+  const float old_feedrate_mm_s = feedrate_mm_s;
604 607
   feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
605 608
 
606
-  // Move the probe to the given XY
607
-  do_blocking_move_to_xy(nx, ny);
609
+  // Move the probe to the starting XYZ
610
+  do_blocking_move_to(nx, ny, nz);
608 611
 
609 612
   float measured_z = NAN;
610 613
   if (!DEPLOY_PROBE()) {

Loading…
Cancel
Save