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
f49a73d69f
commit
58d128b7a9
1 changed files with 4 additions and 4 deletions
|
@ -1033,6 +1033,10 @@ static void axis_is_at_home(int axis) {
|
||||||
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
||||||
max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0
|
||||||
|
if (axis == Z_AXIS) current_position[Z_AXIS] += zprobe_zoffset;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2041,10 +2045,6 @@ inline void gcode_G28() {
|
||||||
if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
|
if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
|
||||||
current_position[Z_AXIS] = code_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();
|
sync_plan_position();
|
||||||
|
|
||||||
#endif // else DELTA
|
#endif // else DELTA
|
||||||
|
|
Reference in a new issue