From 382f976b32be1b71ffd22180b30debaf1e5e436b Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Tue, 6 Aug 2024 01:27:31 -0400 Subject: [PATCH 1/5] Update - Mesh Inset workaround --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 40 +++++++++++++++++---------- Marlin/src/lcd/marlinui.cpp | 7 +++++ Marlin/src/lcd/marlinui.h | 7 +++++ Marlin/src/module/settings.cpp | 44 ++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 14 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index db79853aec..dfc48852f7 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2050,6 +2050,18 @@ void DWIN_Print_Aborted() { } #endif + #if ALL(PROUI_MESH_EDIT, HAS_MESH) + void SetMeshArea() { + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_inset_min_x; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_inset_max_x; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_inset_min_y; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_inset_max_y; + set_bed_leveling_enabled(false); + reset_bed_level(); + ReDrawMenu(); + } +#endif + void DWIN_SetDataDefaults() { DEBUG_ECHOLNPGM("DWIN_SetDataDefaults"); DWIN_SetColorDefaults(); @@ -4297,13 +4309,13 @@ void Draw_MaxAccel_Menu() { // Mesh Inset void ApplyMeshInset() { set_bed_leveling_enabled(false); reset_bed_level(); ReDrawItem(); } - void SetXMeshInset() { SetPFloatOnClick(0, X_BED_SIZE, UNITFDIGITS, ApplyMeshInset); } - void SetYMeshInset() { SetPFloatOnClick(0, Y_BED_SIZE, UNITFDIGITS, ApplyMeshInset); } + void SetXMeshInset() { SetPFloatOnClick(0, X_BED_SIZE, UNITFDIGITS, SetMeshArea, ApplyMeshInset); } + void SetYMeshInset() { SetPFloatOnClick(0, Y_BED_SIZE, UNITFDIGITS, SetMeshArea, ApplyMeshInset); } void MaxMeshArea() { - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = 0; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = X_BED_SIZE; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = 0; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = Y_BED_SIZE; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_inset_min_x = 0; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_inset_max_x = X_BED_SIZE; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_inset_min_y = 0; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_inset_max_y = Y_BED_SIZE; set_bed_leveling_enabled(false); reset_bed_level(); ReDrawMenu(); @@ -4313,10 +4325,10 @@ void Draw_MaxAccel_Menu() { if (max < X_BED_SIZE - MESH_MAX_X) { max = X_BED_SIZE - MESH_MAX_X; } if (max < MESH_MIN_Y) { max = MESH_MIN_Y; } if (max < Y_BED_SIZE - MESH_MAX_Y) { max = Y_BED_SIZE - MESH_MAX_Y; } - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = max; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = X_BED_SIZE - max; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = max; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = Y_BED_SIZE - max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_inset_min_x = max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_inset_max_x = X_BED_SIZE - max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_inset_min_y = max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_inset_max_y = Y_BED_SIZE - max; set_bed_leveling_enabled(false); reset_bed_level(); ReDrawMenu(); @@ -4326,10 +4338,10 @@ void Draw_MaxAccel_Menu() { checkkey = Menu; if (SET_MENU(MeshInsetMenu, MSG_MESH_INSET, 7)) { BACK_ITEM(Draw_MeshSet_Menu); - EDIT_ITEM(ICON_Box, MSG_MESH_MIN_X, onDrawPFloatMenu, SetXMeshInset, TERN(PROUI_EX, &PRO_data, &HMI_data).mesh_min_x); - EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_X, onDrawPFloatMenu, SetXMeshInset, TERN(PROUI_EX, &PRO_data, &HMI_data).mesh_max_x); - EDIT_ITEM(ICON_Box, MSG_MESH_MIN_Y, onDrawPFloatMenu, SetYMeshInset, TERN(PROUI_EX, &PRO_data, &HMI_data).mesh_min_y); - EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_Y, onDrawPFloatMenu, SetYMeshInset, TERN(PROUI_EX, &PRO_data, &HMI_data).mesh_max_y); + EDIT_ITEM(ICON_Box, MSG_MESH_MIN_X, onDrawPFloatMenu, SetXMeshInset, &ui.mesh_inset_min_x); + EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_X, onDrawPFloatMenu, SetXMeshInset, &ui.mesh_inset_max_x); + EDIT_ITEM(ICON_Box, MSG_MESH_MIN_Y, onDrawPFloatMenu, SetYMeshInset, &ui.mesh_inset_min_y); + EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_Y, onDrawPFloatMenu, SetYMeshInset, &ui.mesh_inset_max_y); MENU_ITEM(ICON_AxisC, MSG_MESH_AMAX, onDrawMenuItem, MaxMeshArea); MENU_ITEM(ICON_SetHome, MSG_MESH_CENTER, onDrawMenuItem, CenterMeshArea); } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index f16692d890..07f9850715 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -64,6 +64,13 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; +#if ALL(PROUI_MESH_EDIT, HAS_MESH) + float MarlinUI::mesh_inset_min_x = MESH_INSET; + float MarlinUI::mesh_inset_max_x = X_BED_SIZE - MESH_INSET; + float MarlinUI::mesh_inset_min_y = MESH_INSET; + float MarlinUI::mesh_inset_max_y = Y_BED_SIZE - MESH_INSET; +#endif + #ifdef BED_SCREW_INSET float MarlinUI::screw_pos = BED_SCREW_INSET; #endif diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index e4adc3aa10..0a95c48dad 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -197,6 +197,13 @@ class MarlinUI { TERN_(HAS_MARLINUI_MENU, currentScreen = status_screen); } + #if ALL(PROUI_MESH_EDIT, HAS_MESH) + static float mesh_inset_min_x; + static float mesh_inset_max_x; + static float mesh_inset_min_y; + static float mesh_inset_max_y; + #endif + #ifdef BED_SCREW_INSET static float screw_pos; // bed corner screw inset #endif diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index ebdce90cf6..ae190bf98e 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -626,6 +626,16 @@ typedef struct SettingsDataStruct { bool tick_on; //encoder beep #endif + // + // MESH_INSET workaround + // + #if ALL(PROUI_MESH_EDIT, HAS_MESH) + float ui_mesh_inset_min_x; + float ui_mesh_inset_max_x; + float ui_mesh_inset_min_y; + float ui_mesh_inset_max_y; + #endif + // // Bed corner screw position // @@ -1757,6 +1767,16 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(ui.tick_on); #endif + // + // MESH_INSET workaround + // + #if ALL(PROUI_MESH_EDIT, HAS_MESH) + EEPROM_WRITE(ui.mesh_inset_min_x); + EEPROM_WRITE(ui.mesh_inset_max_x); + EEPROM_WRITE(ui.mesh_inset_min_y); + EEPROM_WRITE(ui.mesh_inset_max_y); + #endif + // // BED_SCREW_INSET // @@ -2895,6 +2915,20 @@ void MarlinSettings::postprocess() { EEPROM_READ(ui.tick_on); #endif + // + // MESH_INSET workaround + // + #if ALL(PROUI_MESH_EDIT, HAS_MESH) + _FIELD_TEST(ui_mesh_inset_min_x); + EEPROM_READ(ui.mesh_inset_min_x); + _FIELD_TEST(ui_mesh_inset_max_x); + EEPROM_READ(ui.mesh_inset_max_x); + _FIELD_TEST(ui_mesh_inset_min_y); + EEPROM_READ(ui.mesh_inset_min_y); + _FIELD_TEST(ui_mesh_inset_max_y); + EEPROM_READ(ui.mesh_inset_max_y); + #endif + // // BED_SCREW_INSET // @@ -3463,6 +3497,16 @@ void MarlinSettings::reset() { ui.tick_on = ENABLED(TICK_ON_DEFAULT); //added encoder beep bool #endif + // + // MESH_INSET workaround + // + #if ALL(PROUI_MESH_EDIT, HAS_MESH) + ui.mesh_inset_min_x = MESH_INSET; + ui.mesh_inset_max_x = (DEF_X_BED_SIZE - MESH_INSET); + ui.mesh_inset_min_y = MESH_INSET; + ui.mesh_inset_max_y = (DEF_Y_BED_SIZE - MESH_INSET); + #endif + // // BED_SCREW_INSET // From 285d48970e4772cfa7ceefee0dbefa16cefd05fd Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Tue, 6 Aug 2024 08:48:33 -0400 Subject: [PATCH 2/5] settings def --- Marlin/src/module/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index ae190bf98e..adf4a7cddd 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -3502,9 +3502,9 @@ void MarlinSettings::reset() { // #if ALL(PROUI_MESH_EDIT, HAS_MESH) ui.mesh_inset_min_x = MESH_INSET; - ui.mesh_inset_max_x = (DEF_X_BED_SIZE - MESH_INSET); + ui.mesh_inset_max_x = (X_BED_SIZE - MESH_INSET); ui.mesh_inset_min_y = MESH_INSET; - ui.mesh_inset_max_y = (DEF_Y_BED_SIZE - MESH_INSET); + ui.mesh_inset_max_y = (Y_BED_SIZE - MESH_INSET); #endif // From df52f398399e04714f6035e01bc29d6a6214174d Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Tue, 6 Aug 2024 12:45:34 -0400 Subject: [PATCH 3/5] Update - mesh_inset_ =:> mesh_ --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 32 +++++++++---------- Marlin/src/lcd/e3v2/proui/dwin_defines.h | 2 +- Marlin/src/lcd/marlinui.cpp | 8 ++--- Marlin/src/lcd/marlinui.h | 8 ++--- Marlin/src/module/settings.cpp | 40 ++++++++++++------------ 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index dfc48852f7..95bd28a6bf 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2052,10 +2052,10 @@ void DWIN_Print_Aborted() { #if ALL(PROUI_MESH_EDIT, HAS_MESH) void SetMeshArea() { - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_inset_min_x; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_inset_max_x; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_inset_min_y; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_inset_max_y; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_min_x; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_max_x; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_min_y; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_max_y; set_bed_leveling_enabled(false); reset_bed_level(); ReDrawMenu(); @@ -4312,10 +4312,10 @@ void Draw_MaxAccel_Menu() { void SetXMeshInset() { SetPFloatOnClick(0, X_BED_SIZE, UNITFDIGITS, SetMeshArea, ApplyMeshInset); } void SetYMeshInset() { SetPFloatOnClick(0, Y_BED_SIZE, UNITFDIGITS, SetMeshArea, ApplyMeshInset); } void MaxMeshArea() { - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_inset_min_x = 0; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_inset_max_x = X_BED_SIZE; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_inset_min_y = 0; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_inset_max_y = Y_BED_SIZE; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_min_x = 0; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_max_x = X_BED_SIZE; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_min_y = 0; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_max_y = Y_BED_SIZE; set_bed_leveling_enabled(false); reset_bed_level(); ReDrawMenu(); @@ -4325,10 +4325,10 @@ void Draw_MaxAccel_Menu() { if (max < X_BED_SIZE - MESH_MAX_X) { max = X_BED_SIZE - MESH_MAX_X; } if (max < MESH_MIN_Y) { max = MESH_MIN_Y; } if (max < Y_BED_SIZE - MESH_MAX_Y) { max = Y_BED_SIZE - MESH_MAX_Y; } - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_inset_min_x = max; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_inset_max_x = X_BED_SIZE - max; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_inset_min_y = max; - TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_inset_max_y = Y_BED_SIZE - max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x = ui.mesh_min_x = max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_max_x = X_BED_SIZE - max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_min_y = max; + TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_max_y = Y_BED_SIZE - max; set_bed_leveling_enabled(false); reset_bed_level(); ReDrawMenu(); @@ -4338,10 +4338,10 @@ void Draw_MaxAccel_Menu() { checkkey = Menu; if (SET_MENU(MeshInsetMenu, MSG_MESH_INSET, 7)) { BACK_ITEM(Draw_MeshSet_Menu); - EDIT_ITEM(ICON_Box, MSG_MESH_MIN_X, onDrawPFloatMenu, SetXMeshInset, &ui.mesh_inset_min_x); - EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_X, onDrawPFloatMenu, SetXMeshInset, &ui.mesh_inset_max_x); - EDIT_ITEM(ICON_Box, MSG_MESH_MIN_Y, onDrawPFloatMenu, SetYMeshInset, &ui.mesh_inset_min_y); - EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_Y, onDrawPFloatMenu, SetYMeshInset, &ui.mesh_inset_max_y); + EDIT_ITEM(ICON_Box, MSG_MESH_MIN_X, onDrawPFloatMenu, SetXMeshInset, &ui.mesh_min_x); + EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_X, onDrawPFloatMenu, SetXMeshInset, &ui.mesh_max_x); + EDIT_ITEM(ICON_Box, MSG_MESH_MIN_Y, onDrawPFloatMenu, SetYMeshInset, &ui.mesh_min_y); + EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_Y, onDrawPFloatMenu, SetYMeshInset, &ui.mesh_max_y); MENU_ITEM(ICON_AxisC, MSG_MESH_AMAX, onDrawMenuItem, MaxMeshArea); MENU_ITEM(ICON_SetHome, MSG_MESH_CENTER, onDrawMenuItem, CenterMeshArea); } diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index 127c8180d0..0ba37bd8b1 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -126,7 +126,7 @@ #if HAS_TOOLBAR constexpr uint8_t TBMaxOpt = 5; // Amount of shortcuts on screen #if HAS_BED_PROBE - #define DEF_TBOPT {1, 7, 6, 2, 4} // Default shorcuts for ALB/UBL + #define DEF_TBOPT {1, 7, 6, 2, 4} // Default shorcuts for ABL/UBL #else #define DEF_TBOPT {1, 5, 4, 2, 3}; // Default shortcuts for MM #endif diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 07f9850715..59d534c407 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -65,10 +65,10 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if ALL(PROUI_MESH_EDIT, HAS_MESH) - float MarlinUI::mesh_inset_min_x = MESH_INSET; - float MarlinUI::mesh_inset_max_x = X_BED_SIZE - MESH_INSET; - float MarlinUI::mesh_inset_min_y = MESH_INSET; - float MarlinUI::mesh_inset_max_y = Y_BED_SIZE - MESH_INSET; + float MarlinUI::mesh_min_x = TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x; + float MarlinUI::mesh_max_x = TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x; + float MarlinUI::mesh_min_y = TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y; + float MarlinUI::mesh_max_y = TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y; #endif #ifdef BED_SCREW_INSET diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 0a95c48dad..9b4c43c65e 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -198,10 +198,10 @@ class MarlinUI { } #if ALL(PROUI_MESH_EDIT, HAS_MESH) - static float mesh_inset_min_x; - static float mesh_inset_max_x; - static float mesh_inset_min_y; - static float mesh_inset_max_y; + static float mesh_min_x; + static float mesh_max_x; + static float mesh_min_y; + static float mesh_max_y; #endif #ifdef BED_SCREW_INSET diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index adf4a7cddd..76f205f124 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -630,10 +630,10 @@ typedef struct SettingsDataStruct { // MESH_INSET workaround // #if ALL(PROUI_MESH_EDIT, HAS_MESH) - float ui_mesh_inset_min_x; - float ui_mesh_inset_max_x; - float ui_mesh_inset_min_y; - float ui_mesh_inset_max_y; + float ui_mesh_min_x; + float ui_mesh_max_x; + float ui_mesh_min_y; + float ui_mesh_max_y; #endif // @@ -1771,10 +1771,10 @@ void MarlinSettings::postprocess() { // MESH_INSET workaround // #if ALL(PROUI_MESH_EDIT, HAS_MESH) - EEPROM_WRITE(ui.mesh_inset_min_x); - EEPROM_WRITE(ui.mesh_inset_max_x); - EEPROM_WRITE(ui.mesh_inset_min_y); - EEPROM_WRITE(ui.mesh_inset_max_y); + EEPROM_WRITE(ui.mesh_min_x); + EEPROM_WRITE(ui.mesh_max_x); + EEPROM_WRITE(ui.mesh_min_y); + EEPROM_WRITE(ui.mesh_max_y); #endif // @@ -2919,14 +2919,14 @@ void MarlinSettings::postprocess() { // MESH_INSET workaround // #if ALL(PROUI_MESH_EDIT, HAS_MESH) - _FIELD_TEST(ui_mesh_inset_min_x); - EEPROM_READ(ui.mesh_inset_min_x); - _FIELD_TEST(ui_mesh_inset_max_x); - EEPROM_READ(ui.mesh_inset_max_x); - _FIELD_TEST(ui_mesh_inset_min_y); - EEPROM_READ(ui.mesh_inset_min_y); - _FIELD_TEST(ui_mesh_inset_max_y); - EEPROM_READ(ui.mesh_inset_max_y); + _FIELD_TEST(ui_mesh_min_x); + EEPROM_READ(ui.mesh_min_x); + _FIELD_TEST(ui_mesh_max_x); + EEPROM_READ(ui.mesh_max_x); + _FIELD_TEST(ui_mesh_min_y); + EEPROM_READ(ui.mesh_min_y); + _FIELD_TEST(ui_mesh_max_y); + EEPROM_READ(ui.mesh_max_y); #endif // @@ -3501,10 +3501,10 @@ void MarlinSettings::reset() { // MESH_INSET workaround // #if ALL(PROUI_MESH_EDIT, HAS_MESH) - ui.mesh_inset_min_x = MESH_INSET; - ui.mesh_inset_max_x = (X_BED_SIZE - MESH_INSET); - ui.mesh_inset_min_y = MESH_INSET; - ui.mesh_inset_max_y = (Y_BED_SIZE - MESH_INSET); + ui.mesh_min_x = TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_x; + ui.mesh_max_x = TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x; + ui.mesh_min_y = TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y; + ui.mesh_max_y = TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y; #endif // From 44a1bc7c9fd2d82f0143b2de71cc28453b3f0635 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Tue, 6 Aug 2024 12:47:09 -0400 Subject: [PATCH 4/5] ApplyMeshInset --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 95bd28a6bf..5a9f6655a5 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2056,9 +2056,7 @@ void DWIN_Print_Aborted() { TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_x = ui.mesh_max_x; TERN(PROUI_EX, PRO_data, HMI_data).mesh_min_y = ui.mesh_min_y; TERN(PROUI_EX, PRO_data, HMI_data).mesh_max_y = ui.mesh_max_y; - set_bed_leveling_enabled(false); - reset_bed_level(); - ReDrawMenu(); + ApplyMeshInset(); } #endif From 89b7b3259d18a01c3c344c73b9c2fe4c1ddaba3f Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Tue, 6 Aug 2024 12:56:50 -0400 Subject: [PATCH 5/5] ApplyMeshInset void --- Marlin/src/lcd/e3v2/proui/dwin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 115aed72ca..1ef3483ed8 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -333,6 +333,7 @@ void Draw_MaxAccel_Menu(); void Draw_MeshInset_Menu(); #if ENABLED(PROUI_MESH_EDIT) void Draw_EditMesh_Menu(); + void ApplyMeshInset(); #endif #endif #if HAS_TRINAMIC_CONFIG