From b78cccad0fb41a45b2cf651ed18a4db21068ce3f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 1 Feb 2018 03:19:30 -0600 Subject: [PATCH] Fix broken G29 W I J --- Marlin/Marlin_main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ea376a19f..0daf605de 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4490,7 +4490,8 @@ void home_all_axes() { gcode_G28(true); } #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - if (parser.seen('W')) { + const bool seen_w = parser.seen('W'); + if (seen_w) { if (!leveling_is_valid()) { SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("No bilinear grid"); @@ -4528,10 +4529,14 @@ void home_all_axes() { gcode_G28(true); } return; } // parser.seen('W') + #else + + constexpr bool seen_w = false; + #endif // Jettison bed leveling data - if (parser.seen('J')) { + if (!seen_w && parser.seen('J')) { reset_bed_level(); return; }