|
@@ -1289,7 +1289,7 @@ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) {
|
1289
|
1289
|
/**
|
1290
|
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
|
1293
|
DEBUG_SECTION(log_move, "do_homing_move", DEBUGGING(LEVELING));
|
1294
|
1294
|
|
1295
|
1295
|
const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis);
|
|
@@ -1320,7 +1320,7 @@ void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t
|
1320
|
1320
|
thermalManager.wait_for_bed_heating();
|
1321
|
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
|
1326
|
// Disable stealthChop if used. Enable diag1 pin on driver.
|
|
@@ -1359,7 +1359,7 @@ void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t
|
1359
|
1359
|
if (is_home_dir) {
|
1360
|
1360
|
|
1361
|
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
|
1363
|
#endif
|
1364
|
1364
|
|
1365
|
1365
|
endstops.validate_homing_move();
|
|
@@ -1608,32 +1608,29 @@ void homeaxis(const AxisEnum axis) {
|
1608
|
1608
|
}
|
1609
|
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
|
1619
|
// Fast move towards endstop until triggered
|
1613
|
1620
|
//
|
1614
|
1621
|
const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir;
|
1615
|
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
|
1625
|
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE)
|
1619
|
1626
|
if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
|
1620
|
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
|
1629
|
// If a second homing move is configured...
|
1629
|
1630
|
if (bump) {
|
1630
|
1631
|
// Move away from the endstop by the axis HOMING_BUMP_MM
|
1631
|
1632
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm");
|
1632
|
|
- do_homing_move(axis, -bump
|
1633
|
|
- #if HOMING_Z_WITH_PROBE
|
1634
|
|
- , MMM_TO_MMS(axis == Z_AXIS ? Z_PROBE_SPEED_FAST : 0)
|
1635
|
|
- #endif
|
1636
|
|
- );
|
|
1633
|
+ do_homing_move(axis, -bump, TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) : 0, false);
|
1637
|
1634
|
|
1638
|
1635
|
#if ENABLED(DETECT_BROKEN_ENDSTOP)
|
1639
|
1636
|
// Check for a broken endstop
|
|
@@ -1657,7 +1654,7 @@ void homeaxis(const AxisEnum axis) {
|
1657
|
1654
|
// Slow move towards endstop until triggered
|
1658
|
1655
|
const float rebump = bump * 2;
|
1659
|
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
|
1659
|
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
1663
|
1660
|
if (axis == Z_AXIS) bltouch.stow(); // The final STOW
|