From c242bee44940fe586b3c48802a558d5d29614dc0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 Apr 2016 00:10:52 -0700 Subject: [PATCH] Add a final lift, if configured, in Manual Bed Leveling --- Marlin/Marlin_main.cpp | 6 +++++- Marlin/ultralcd.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ab0a24ebf..ffe0a5a58 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2951,7 +2951,11 @@ inline void gcode_G28() { } else { // One last "return to the bed" (as originally coded) at completion - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; + current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + #if MIN_Z_HEIGHT_FOR_HOMING > 0 + + MIN_Z_HEIGHT_FOR_HOMING + #endif + ; line_to_current_position(); st_synchronize(); diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 31d5d3165..c1a55380c 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -960,7 +960,11 @@ void lcd_cooldown() { buzz(200, 659); buzz(200, 698); #endif - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; + current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + #if MIN_Z_HEIGHT_FOR_HOMING > 0 + + MIN_Z_HEIGHT_FOR_HOMING + #endif + ; line_to_current(Z_AXIS); st_synchronize(); mbl.active = true;