Przeglądaj źródła

Defer "quiet probing" till the last Z bump (#20610)

FanDjango 4 lat temu
rodzic
commit
55d1938977
No account linked to committer's email address
2 zmienionych plików z 14 dodań i 17 usunięć
  1. 13
    16
      Marlin/src/module/motion.cpp
  2. 1
    1
      Marlin/src/module/planner.h

+ 13
- 16
Marlin/src/module/motion.cpp Wyświetl plik

1289
 /**
1289
 /**
1290
  * Home an individual linear axis
1290
  * Home an individual linear axis
1291
  */
1291
  */
1292
-void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t fr_mm_s=0.0) {
1292
+void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t fr_mm_s=0.0, const bool final_approach=true) {
1293
   DEBUG_SECTION(log_move, "do_homing_move", DEBUGGING(LEVELING));
1293
   DEBUG_SECTION(log_move, "do_homing_move", DEBUGGING(LEVELING));
1294
 
1294
 
1295
   const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis);
1295
   const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis);
1320
         thermalManager.wait_for_bed_heating();
1320
         thermalManager.wait_for_bed_heating();
1321
       #endif
1321
       #endif
1322
 
1322
 
1323
-      TERN_(HAS_QUIET_PROBING, probe.set_probing_paused(true));
1323
+      TERN_(HAS_QUIET_PROBING, if (final_approach) probe.set_probing_paused(true));
1324
     }
1324
     }
1325
 
1325
 
1326
     // Disable stealthChop if used. Enable diag1 pin on driver.
1326
     // Disable stealthChop if used. Enable diag1 pin on driver.
1359
   if (is_home_dir) {
1359
   if (is_home_dir) {
1360
 
1360
 
1361
     #if HOMING_Z_WITH_PROBE && HAS_QUIET_PROBING
1361
     #if HOMING_Z_WITH_PROBE && HAS_QUIET_PROBING
1362
-      if (axis == Z_AXIS) probe.set_probing_paused(false);
1362
+      if (axis == Z_AXIS && final_approach) probe.set_probing_paused(false);
1363
     #endif
1363
     #endif
1364
 
1364
 
1365
     endstops.validate_homing_move();
1365
     endstops.validate_homing_move();
1608
     }
1608
     }
1609
   #endif
1609
   #endif
1610
 
1610
 
1611
+  // Determine if a homing bump will be done and the bumps distance
1612
+  // When homing Z with probe respect probe clearance
1613
+  const bool use_probe_bump = TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && home_bump_mm(Z_AXIS));
1614
+  const float bump = axis_home_dir * (
1615
+    use_probe_bump ? _MAX(TERN0(HOMING_Z_WITH_PROBE, Z_CLEARANCE_BETWEEN_PROBES), home_bump_mm(Z_AXIS)) : home_bump_mm(axis)
1616
+  );
1617
+
1611
   //
1618
   //
1612
   // Fast move towards endstop until triggered
1619
   // Fast move towards endstop until triggered
1613
   //
1620
   //
1614
   const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir;
1621
   const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir;
1615
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Home Fast: ", move_length, "mm");
1622
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Home Fast: ", move_length, "mm");
1616
-  do_homing_move(axis, move_length);
1623
+  do_homing_move(axis, move_length, 0.0, !use_probe_bump);
1617
 
1624
 
1618
   #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE)
1625
   #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE)
1619
     if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
1626
     if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
1620
   #endif
1627
   #endif
1621
 
1628
 
1622
-  // When homing Z with probe respect probe clearance
1623
-  const bool use_probe_bump = TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && home_bump_mm(Z_AXIS));
1624
-  const float bump = axis_home_dir * (
1625
-    use_probe_bump ? _MAX(TERN0(HOMING_Z_WITH_PROBE, Z_CLEARANCE_BETWEEN_PROBES), home_bump_mm(Z_AXIS)) : home_bump_mm(axis)
1626
-  );
1627
-
1628
   // If a second homing move is configured...
1629
   // If a second homing move is configured...
1629
   if (bump) {
1630
   if (bump) {
1630
     // Move away from the endstop by the axis HOMING_BUMP_MM
1631
     // Move away from the endstop by the axis HOMING_BUMP_MM
1631
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm");
1632
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm");
1632
-    do_homing_move(axis, -bump
1633
+    do_homing_move(axis, -bump, TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) : 0, false);
1633
-      #if HOMING_Z_WITH_PROBE
1634
-        , MMM_TO_MMS(axis == Z_AXIS ? Z_PROBE_SPEED_FAST : 0)
1635
-      #endif
1636
-    );
1637
 
1634
 
1638
     #if ENABLED(DETECT_BROKEN_ENDSTOP)
1635
     #if ENABLED(DETECT_BROKEN_ENDSTOP)
1639
       // Check for a broken endstop
1636
       // Check for a broken endstop
1657
     // Slow move towards endstop until triggered
1654
     // Slow move towards endstop until triggered
1658
     const float rebump = bump * 2;
1655
     const float rebump = bump * 2;
1659
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Re-bump: ", rebump, "mm");
1656
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Re-bump: ", rebump, "mm");
1660
-    do_homing_move(axis, rebump, get_homing_bump_feedrate(axis));
1657
+    do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true);
1661
 
1658
 
1662
     #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
1659
     #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
1663
       if (axis == Z_AXIS) bltouch.stow(); // The final STOW
1660
       if (axis == Z_AXIS) bltouch.stow(); // The final STOW

+ 1
- 1
Marlin/src/module/planner.h Wyświetl plik

712
     private:
712
     private:
713
 
713
 
714
       // Allow do_homing_move to access internal functions, such as buffer_segment.
714
       // Allow do_homing_move to access internal functions, such as buffer_segment.
715
-      friend void do_homing_move(const AxisEnum, const float, const feedRate_t);
715
+      friend void do_homing_move(const AxisEnum, const float, const feedRate_t, const bool);
716
   #endif
716
   #endif
717
 
717
 
718
     /**
718
     /**

Ładowanie…
Anuluj
Zapisz