mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Apply zprobe_zoffset in axis_is_at_home
Ensure the probe offset will always be included when homing Z.
This commit is contained in:
parent
a0a5ff61c4
commit
0165560333
@ -1034,6 +1034,10 @@ static void axis_is_at_home(int axis) {
|
||||
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
||||
max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0
|
||||
if (axis == Z_AXIS) current_position[Z_AXIS] += zprobe_zoffset;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2042,10 +2046,6 @@ inline void gcode_G28() {
|
||||
if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
|
||||
current_position[Z_AXIS] = code_value();
|
||||
|
||||
#if defined(ENABLE_AUTO_BED_LEVELING) && (Z_HOME_DIR < 0)
|
||||
if (home_all_axis || homeZ) current_position[Z_AXIS] += zprobe_zoffset; // Add Z_Probe offset (the distance is negative)
|
||||
#endif
|
||||
|
||||
sync_plan_position();
|
||||
|
||||
#endif // else DELTA
|
||||
|
Loading…
Reference in New Issue
Block a user