|
@@ -74,15 +74,6 @@
|
74
|
74
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
75
|
75
|
#include "../core/debug_out.h"
|
76
|
76
|
|
77
|
|
-#define XYZ_CONSTS(T, NAME, OPT) const PROGMEM XYZval<T> NAME##_P = { X_##OPT, Y_##OPT, Z_##OPT }
|
78
|
|
-
|
79
|
|
-XYZ_CONSTS(float, base_min_pos, MIN_POS);
|
80
|
|
-XYZ_CONSTS(float, base_max_pos, MAX_POS);
|
81
|
|
-XYZ_CONSTS(float, base_home_pos, HOME_POS);
|
82
|
|
-XYZ_CONSTS(float, max_length, MAX_LENGTH);
|
83
|
|
-XYZ_CONSTS(float, home_bump_mm, HOME_BUMP_MM);
|
84
|
|
-XYZ_CONSTS(signed char, home_dir, HOME_DIR);
|
85
|
|
-
|
86
|
77
|
/**
|
87
|
78
|
* axis_homed
|
88
|
79
|
* Flags that each linear axis was homed.
|
|
@@ -1567,14 +1558,13 @@ void homeaxis(const AxisEnum axis) {
|
1567
|
1558
|
if (axis == Z_AXIS && bltouch.deploy()) return; // The initial DEPLOY
|
1568
|
1559
|
#endif
|
1569
|
1560
|
|
1570
|
|
- do_homing_move(axis, 1.5f * max_length(
|
1571
|
|
- #if ENABLED(DELTA)
|
1572
|
|
- Z_AXIS
|
1573
|
|
- #else
|
1574
|
|
- axis
|
1575
|
|
- #endif
|
1576
|
|
- ) * axis_home_dir
|
1577
|
|
- );
|
|
1561
|
+ #if DISABLED(DELTA) && defined(SENSORLESS_BACKOFF_MM)
|
|
1562
|
+ const xy_float_t backoff = SENSORLESS_BACKOFF_MM;
|
|
1563
|
+ if (((ENABLED(X_SENSORLESS) && axis == X_AXIS) || (ENABLED(Y_SENSORLESS) && axis == Y_AXIS)) && backoff[axis])
|
|
1564
|
+ do_homing_move(axis, -ABS(backoff[axis]) * axis_home_dir, homing_feedrate(axis));
|
|
1565
|
+ #endif
|
|
1566
|
+
|
|
1567
|
+ do_homing_move(axis, 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir);
|
1578
|
1568
|
|
1579
|
1569
|
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
|
1580
|
1570
|
if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
|
|
@@ -1583,14 +1573,14 @@ void homeaxis(const AxisEnum axis) {
|
1583
|
1573
|
// When homing Z with probe respect probe clearance
|
1584
|
1574
|
const float bump = axis_home_dir * (
|
1585
|
1575
|
#if HOMING_Z_WITH_PROBE
|
1586
|
|
- (axis == Z_AXIS && (Z_HOME_BUMP_MM)) ? _MAX(Z_CLEARANCE_BETWEEN_PROBES, Z_HOME_BUMP_MM) :
|
|
1576
|
+ (axis == Z_AXIS && home_bump_mm(Z_AXIS)) ? _MAX(Z_CLEARANCE_BETWEEN_PROBES, home_bump_mm(Z_AXIS)) :
|
1587
|
1577
|
#endif
|
1588
|
1578
|
home_bump_mm(axis)
|
1589
|
1579
|
);
|
1590
|
1580
|
|
1591
|
1581
|
// If a second homing move is configured...
|
1592
|
1582
|
if (bump) {
|
1593
|
|
- // Move away from the endstop by the axis HOME_BUMP_MM
|
|
1583
|
+ // Move away from the endstop by the axis HOMING_BUMP_MM
|
1594
|
1584
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Move Away:");
|
1595
|
1585
|
do_homing_move(axis, -bump
|
1596
|
1586
|
#if HOMING_Z_WITH_PROBE
|
|
@@ -1785,8 +1775,8 @@ void homeaxis(const AxisEnum axis) {
|
1785
|
1775
|
if (axis == Z_AXIS && probe.stow()) return;
|
1786
|
1776
|
#endif
|
1787
|
1777
|
|
1788
|
|
- #if DISABLED(DELTA) && defined(HOMING_BACKOFF_MM)
|
1789
|
|
- const xyz_float_t endstop_backoff = HOMING_BACKOFF_MM;
|
|
1778
|
+ #if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM)
|
|
1779
|
+ const xyz_float_t endstop_backoff = HOMING_BACKOFF_POST_MM;
|
1790
|
1780
|
if (endstop_backoff[axis]) {
|
1791
|
1781
|
current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir;
|
1792
|
1782
|
line_to_current_position(
|