Fix HOMING_BACKOFF_MM for DELTA (#16657)
This commit is contained in:
parent
4a71285c34
commit
44d400db83
|
@ -254,7 +254,7 @@ void home_delta() {
|
||||||
- probe_offset.z
|
- probe_offset.z
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
line_to_current_position(homing_feedrate(X_AXIS));
|
line_to_current_position(homing_feedrate(Z_AXIS));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
||||||
|
@ -280,6 +280,14 @@ void home_delta() {
|
||||||
|
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
|
|
||||||
|
#if DISABLED(DELTA_HOME_TO_SAFE_ZONE) && defined(HOMING_BACKOFF_MM)
|
||||||
|
constexpr xyz_float_t endstop_backoff = HOMING_BACKOFF_MM;
|
||||||
|
if (endstop_backoff.z) {
|
||||||
|
current_position.z -= ABS(endstop_backoff.z) * Z_HOME_DIR;
|
||||||
|
line_to_current_position(homing_feedrate(Z_AXIS));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("<<< home_delta", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("<<< home_delta", current_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1748,15 +1748,9 @@ void homeaxis(const AxisEnum axis) {
|
||||||
if (axis == Z_AXIS && STOW_PROBE()) return;
|
if (axis == Z_AXIS && STOW_PROBE()) return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HOMING_BACKOFF_MM
|
#if DISABLED(DELTA) && defined(HOMING_BACKOFF_MM)
|
||||||
constexpr xyz_float_t endstop_backoff = HOMING_BACKOFF_MM;
|
constexpr xyz_float_t endstop_backoff = HOMING_BACKOFF_MM;
|
||||||
const float backoff_mm = endstop_backoff[
|
const float backoff_mm = endstop_backoff[axis];
|
||||||
#if ENABLED(DELTA)
|
|
||||||
Z_AXIS
|
|
||||||
#else
|
|
||||||
axis
|
|
||||||
#endif
|
|
||||||
];
|
|
||||||
if (backoff_mm) {
|
if (backoff_mm) {
|
||||||
current_position[axis] -= ABS(backoff_mm) * axis_home_dir;
|
current_position[axis] -= ABS(backoff_mm) * axis_home_dir;
|
||||||
line_to_current_position(
|
line_to_current_position(
|
||||||
|
|
Loading…
Reference in a new issue