From d1eb100806bc0d1f0d4fa033cfcae038ef83e4ed Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Fri, 16 Oct 2020 09:30:41 -0400 Subject: [PATCH] Update G28.cpp --- Marlin/src/gcode/calibrate/G28.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index b21d18c82b..f3ea361231 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -47,7 +47,7 @@ #include "../../lcd/ultralcd.h" #if ENABLED(DWIN_CREALITY_LCD) - #include "../../lcd/dwin/dwin.h" + #include "../../lcd/dwin/e3v2/dwin.h" #endif #if HAS_L64XX // set L6470 absolute position registers to counts @@ -118,7 +118,8 @@ DEBUG_SECTION(log_G28, "home_z_safely", DEBUGGING(LEVELING)); // Disallow Z homing if X or Y homing is needed - if (axis_unhomed_error(_BV(X_AXIS) | _BV(Y_AXIS))) return; + if (homing_needed_error(_BV(X_AXIS) | _BV(Y_AXIS))) return; + sync_plan_position(); /** @@ -196,7 +197,6 @@ * X Home to the X endstop * Y Home to the Y endstop * Z Home to the Z endstop - * */ void GcodeSuite::G28() { DEBUG_SECTION(log_G28, "G28", DEBUGGING(LEVELING)); @@ -303,8 +303,8 @@ void GcodeSuite::G28() { #else // NOT DELTA const bool homeZ = parser.seen('Z'), - needX = homeZ && TERN0(Z_SAFE_HOMING, axes_need_homing(_BV(X_AXIS))), - needY = homeZ && TERN0(Z_SAFE_HOMING, axes_need_homing(_BV(Y_AXIS))), + needX = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(X_AXIS))), + needY = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(Y_AXIS))), homeX = needX || parser.seen('X'), homeY = needY || parser.seen('Y'), home_all = homeX == homeY && homeX == homeZ, // All or None doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;