From 5c59ee4e938665ac2cb26888b9515a52d15039b2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 20 Jun 2017 00:10:52 -0500 Subject: [PATCH] Use current (raw) Z if omitted from G29 WXY or G29 WIJ. --- Marlin/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 74426c00a..f30291f2e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4183,7 +4183,7 @@ void home_all_axes() { gcode_G28(true); } * W Write a mesh point. (Ignored during leveling.) * X Required X for mesh point * Y Required Y for mesh point - * Z Required Z for mesh point + * Z Z for mesh point. Otherwise, current Z minus Z probe offset. * * Without PROBE_MANUALLY: * @@ -4316,8 +4316,8 @@ void home_all_axes() { gcode_G28(true); } return; } - const float z = parser.seen('Z') && parser.has_value() ? parser.value_float() : NAN; - if (!isnan(z) || !WITHIN(z, -10, 10)) { + const float z = parser.seen('Z') && parser.has_value() ? parser.value_float() : RAW_CURRENT_POSITION(Z); + if (!WITHIN(z, -10, 10)) { SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("Bad Z value"); return;