diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 3586e29741..130e54ab25 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -819,7 +819,6 @@ void unified_bed_leveling::shift_mesh_height(const float zoffs) { ExtUI::onMeshUpdate(best.pos, ExtUI::G29_POINT_FINISH); ExtUI::onMeshUpdate(best.pos, measured_z); #endif - TERN_(DWIN_LCD_PROUI, meshViewer.drawMeshPoint(best.pos, measured_z)); } SERIAL_FLUSH(); // Prevent host M105 buffer overrun. diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index f9e0fa2bb0..77809605a4 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -803,7 +803,6 @@ G29_TYPE GcodeSuite::G29() { const float z = abl.measured_z + abl.Z_offset; abl.z_values[abl.meshCount.x][abl.meshCount.y] = z; TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, z)); - TERN_(DWIN_LCD_PROUI, meshViewer.drawMeshPoint(abl.meshCount, z)); #if ENABLED(SOVOL_SV06_RTS) if (pt_index <= GRID_MAX_POINTS) rts.sendData(pt_index, AUTO_BED_LEVEL_ICON_VP); diff --git a/Marlin/src/lcd/dwin/proui/meshviewer.h b/Marlin/src/lcd/dwin/proui/meshviewer.h index d81efc04ae..48371f78ec 100644 --- a/Marlin/src/lcd/dwin/proui/meshviewer.h +++ b/Marlin/src/lcd/dwin/proui/meshviewer.h @@ -29,6 +29,8 @@ * Date: 2023/05/05 */ +#include "../../../feature/bedlevel/bedlevel.h" + class MeshViewer { public: static float max, min; diff --git a/Marlin/src/lcd/dwin/proui/proui_extui.cpp b/Marlin/src/lcd/dwin/proui/proui_extui.cpp index 5d16e54aaf..55e06a3b8c 100644 --- a/Marlin/src/lcd/dwin/proui/proui_extui.cpp +++ b/Marlin/src/lcd/dwin/proui/proui_extui.cpp @@ -47,6 +47,10 @@ #include "dwin_popup.h" +#if HAS_MESH + #include "meshviewer.h" +#endif + #include "../../extui/ui_api.h" #include "../../../module/stepper.h" @@ -171,6 +175,7 @@ namespace ExtUI { const int16_t idx = ypos * (GRID_MAX_POINTS_X) + xpos; dwinMeshUpdate(_MIN(idx, GRID_MAX_POINTS), int(GRID_MAX_POINTS), zval); dwinRedrawScreen(); + meshViewer.drawMeshPoint(xpos, ypos, zval); } void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) {