|
|
@ -1167,6 +1167,12 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); |
|
|
|
#endif |
|
|
|
|
|
|
|
static void set_axis_is_at_home(AxisEnum axis) { |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOPAIR("set_axis_is_at_home(", (unsigned long)axis); |
|
|
|
SERIAL_ECHOLNPGM(") >>>"); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) |
|
|
|
if (axis == X_AXIS) { |
|
|
@ -1234,17 +1240,27 @@ static void set_axis_is_at_home(AxisEnum axis) { |
|
|
|
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; |
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && Z_HOME_DIR < 0 |
|
|
|
if (axis == Z_AXIS) current_position[Z_AXIS] -= zprobe_zoffset; |
|
|
|
if (axis == Z_AXIS) { |
|
|
|
current_position[Z_AXIS] -= zprobe_zoffset; |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOPAIR("> zprobe_zoffset==", zprobe_zoffset); |
|
|
|
#endif |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOPAIR("set_axis_is_at_home ", (unsigned long)axis); |
|
|
|
SERIAL_ECHOPAIR(" > (home_offset[axis]==", home_offset[axis]); |
|
|
|
print_xyz(") > current_position", current_position); |
|
|
|
SERIAL_ECHOPAIR("> home_offset[axis]==", home_offset[axis]); |
|
|
|
print_xyz(" > current_position", current_position); |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOPAIR("<<< set_axis_is_at_home(", (unsigned long)axis); |
|
|
|
SERIAL_ECHOLNPGM(")"); |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
@ -2754,12 +2770,12 @@ inline void gcode_G28() { |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(ENDSTOPS_ONLY_FOR_HOMING) |
|
|
|
enable_endstops(false); |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOLNPGM("ENDSTOPS_ONLY_FOR_HOMING enable_endstops(false)"); |
|
|
|
} |
|
|
|
#endif |
|
|
|
enable_endstops(false); |
|
|
|
#endif |
|
|
|
|
|
|
|
// For mesh leveling move back to Z=0
|
|
|
@ -2999,6 +3015,7 @@ inline void gcode_G28() { |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOLNPGM("gcode_G29 >>>"); |
|
|
|
print_xyz("> current_position", current_position); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|