From e77f6d855bc6684a57ed9f67ff2c17835d3fd2c0 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sat, 12 Jun 2021 15:41:43 -0400 Subject: [PATCH] Update EXTUI on MBL --- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 055acc1ed4..d4cd0e8220 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -70,7 +70,7 @@ void GcodeSuite::G29() { return; } - int8_t ix, iy; + int8_t ix, iy = 0; switch (state) { case MeshReport: @@ -89,6 +89,7 @@ void GcodeSuite::G29() { if (!ui.wait_for_move) { queue.inject_P(parser.seen_test('N') ? PSTR("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : PSTR("G29S2")); return; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart()); } state = MeshNext; @@ -109,6 +110,7 @@ void GcodeSuite::G29() { else { // Save Z for the previous mesh position mbl.set_zigzag_z(mbl_probe_index - 1, current_position.z); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z)); SET_SOFT_ENDSTOP_LOOSE(false); } // If there's another point to sample, move there with optional lift.