Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Extra ProUI features #26761

Open
wants to merge 62 commits into
base: bugfix-2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
1129b71
add Cancel ABL, other abl fixes
classicrocker883 Jan 31, 2024
2f1929b
add EXIT_PROBE_MESH
classicrocker883 Feb 1, 2024
87ed27a
fixes for dwin
classicrocker883 Feb 1, 2024
d0e400e
fixes for dwin, add probe_offset to G29
classicrocker883 Feb 2, 2024
2266b79
remove homeZ
classicrocker883 Feb 3, 2024
bb89c67
add multipleProbing
classicrocker883 Feb 3, 2024
059b9b4
revert menus.cpp ^= true, save for other PR
classicrocker883 Feb 3, 2024
6242d1d
add zprobeFeed(rate) feature
classicrocker883 Feb 3, 2024
0ae89c0
update menu options
classicrocker883 Feb 3, 2024
c535a9b
add variable Mesh_Inset
classicrocker883 Feb 4, 2024
bed57fe
add another run_z_probe function for testing
classicrocker883 Feb 4, 2024
8a671ee
update meshinset
classicrocker883 Feb 4, 2024
396bb6c
add GRID points
classicrocker883 Feb 5, 2024
c47cfe4
add grid points (UBL)
classicrocker883 Feb 5, 2024
de13f6d
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 6, 2024
9506730
update for Bilinear + UBL, kinda for MBL (needs more testing)
classicrocker883 Feb 7, 2024
ee716be
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 7, 2024
581803b
couple tweaks
classicrocker883 Feb 7, 2024
70e9ed7
update drawmeshpoints
classicrocker883 Feb 8, 2024
ef22fec
update fix for Mesh bed leveling + the others
classicrocker883 Feb 8, 2024
9aa0573
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 8, 2024
bca866a
update run_z_probe
classicrocker883 Feb 9, 2024
ef01edf
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 9, 2024
c5d7e68
move resetMesh
classicrocker883 Feb 10, 2024
7930249
update settings.cpp gridpoints
classicrocker883 Feb 11, 2024
dc1d4e7
add tram() exclusion
classicrocker883 Feb 15, 2024
0702de9
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 18, 2024
6b719b8
tweak - remove unused
classicrocker883 Feb 19, 2024
859746c
typo
classicrocker883 Feb 21, 2024
038b1db
grid_loop test (warning)
classicrocker883 Feb 21, 2024
114fad2
revert back (test), typos
classicrocker883 Feb 21, 2024
6e5cfd3
adjust ubl_G29 for narrowing conv.
classicrocker883 Feb 29, 2024
f05713e
adjust ubl_G29 spacing
classicrocker883 Feb 29, 2024
cc67a8a
update dwin.cpp, rearrange menu items - add levelMenu
classicrocker883 Mar 14, 2024
ea12b4f
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Mar 14, 2024
4cee1c1
move hmiData to dwin_defines.h, tweak
classicrocker883 Apr 6, 2024
a0647e9
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 14, 2024
ffa5c64
update - merge fixes
classicrocker883 Apr 14, 2024
d67a23f
fix a compile err
thinkyhead Apr 14, 2024
5a9961e
maybe fixes mesh_inset?
classicrocker883 Apr 15, 2024
1226dae
fix editable mesh_inset to work, update get_mesh_x/y()
classicrocker883 Apr 15, 2024
3244427
update gcode_preview to work better
classicrocker883 Apr 15, 2024
b21a8d8
call for ubl
thinkyhead Apr 16, 2024
953f6ba
remove PROUI_GRID_PNTS
classicrocker883 Apr 19, 2024
6039e2b
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 23, 2024
04da879
update for ABL - Bilinear variable mesh_inset
classicrocker883 Apr 28, 2024
61a1d91
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 May 22, 2024
5b615f0
add mesh viewer to display_map
classicrocker883 May 22, 2024
580db49
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 May 28, 2024
a18ef72
revert settings.cpp
classicrocker883 May 28, 2024
f49ace9
remove comments motion.h
classicrocker883 May 28, 2024
e319336
revert some, change some
classicrocker883 May 28, 2024
41a7d62
revert ubl.cpp
classicrocker883 May 28, 2024
ef45055
update from other PR for here
classicrocker883 May 29, 2024
c42dbd7
update dwin.cpp - remove duplicate
classicrocker883 May 30, 2024
b3dcfcc
add missing declaration
classicrocker883 May 30, 2024
fb61d5c
adjust spacing, rearrange MESH_##_DIST
classicrocker883 Jun 1, 2024
f2afc3b
Merge https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x-Jan2
classicrocker883 Jun 27, 2024
7ce624d
Merge https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x-Jan2
classicrocker883 Jul 13, 2024
1f17c48
Merge https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x-Jan2
classicrocker883 Aug 2, 2024
1d505eb
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Oct 21, 2024
61bd4c6
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
#include "../../../lcd/extui/ui_api.h"
#endif

#if ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/meshviewer.h"
#endif

#if ENABLED(UBL_HILBERT_CURVE)
#include "../hilbert_curve.h"
#endif
Expand Down Expand Up @@ -768,7 +772,7 @@ void unified_bed_leveling::shift_mesh_height() {
SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout());
TERN_(DWIN_LCD_PROUI, dwinRedrawScreen());
TERN_(DWIN_LCD_PROUI, if (!hmiFlag.cancel_lev) { dwinRedrawScreen(); } else { break; })

#if HAS_MARLINUI_MENU
if (ui.button_pressed()) {
Expand Down Expand Up @@ -799,11 +803,14 @@ void unified_bed_leveling::shift_mesh_height() {
ExtUI::onMeshUpdate(best.pos, ExtUI::G29_POINT_FINISH);
ExtUI::onMeshUpdate(best.pos, measured_z);
#endif
TERN_(DWIN_LCD_PROUI, meshViewer.drawMeshPoint(best.pos.x, best.pos.y, measured_z));
}
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.

} while (best.pos.x >= 0 && --count);

TERN_(DWIN_LCD_PROUI, if (hmiFlag.cancel_lev) { goto EXIT_PROBE_MESH; })

GRID_LOOP(x, y) if (z_values[x][y] == HUGE_VALF) z_values[x][y] = NAN; // Restore NAN for HUGE_VALF marks

TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::G29_FINISH));
Expand All @@ -813,7 +820,7 @@ void unified_bed_leveling::shift_mesh_height() {
probe.stow();
TERN_(HAS_MARLINUI_MENU, ui.capture());

probe.move_z_after_probing();
TERN_(Z_AFTER_PROBING, probe.move_z_after_probing());

restore_ubl_active_state_and_leave();

Expand All @@ -823,7 +830,7 @@ void unified_bed_leveling::shift_mesh_height() {
);

TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
TERN_(DWIN_LCD_PROUI, dwinLevelingDone());
TERN_(DWIN_LCD_PROUI, EXIT_PROBE_MESH: dwinLevelingDone());
}

#endif // HAS_BED_PROBE
Expand Down Expand Up @@ -1184,9 +1191,9 @@ bool unified_bed_leveling::G29_parse_parameters() {
}

param.XY_seen.x = parser.seenval('X');
float sx = param.XY_seen.x ? parser.value_float() : current_position.x;
float sx = param.XY_seen.x ? parser.value_float() : current_position.x - TERN0(HAS_BED_PROBE, probe.offset.x);
param.XY_seen.y = parser.seenval('Y');
float sy = param.XY_seen.y ? parser.value_float() : current_position.y;
float sy = param.XY_seen.y ? parser.value_float() : current_position.y - TERN0(HAS_BED_PROBE, probe.offset.y);

if (param.XY_seen.x != param.XY_seen.y) {
SERIAL_ECHOLNPGM("Both X & Y locations must be specified.\n");
Expand All @@ -1195,8 +1202,8 @@ bool unified_bed_leveling::G29_parse_parameters() {

// If X or Y are not valid, use center of the bed values
// (for UBL_HILBERT_CURVE default to lower-left corner instead)
if (!COORDINATE_OKAY(sx, X_MIN_BED, X_MAX_BED)) sx = TERN(UBL_HILBERT_CURVE, 0, X_CENTER);
if (!COORDINATE_OKAY(sy, Y_MIN_BED, Y_MAX_BED)) sy = TERN(UBL_HILBERT_CURVE, 0, Y_CENTER);
if (!COORDINATE_OKAY(sx, X_MIN_BED, X_MAX_BED)) sx = TERN(UBL_HILBERT_CURVE, 0, X_CENTER - TERN0(HAS_BED_PROBE, probe.offset.x));
if (!COORDINATE_OKAY(sy, Y_MIN_BED, Y_MAX_BED)) sy = TERN(UBL_HILBERT_CURVE, 0, Y_CENTER - TERN0(HAS_BED_PROBE, probe.offset.y));

if (err_flag) return UBL_ERR;

Expand Down Expand Up @@ -1442,10 +1449,10 @@ typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info;

void unified_bed_leveling::smart_fill_mesh() {
static const smart_fill_info
info0 PROGMEM = { 0, GRID_MAX_POINTS_X, 0, (GRID_MAX_POINTS_Y) - 2, false }, // Bottom of the mesh looking up
info1 PROGMEM = { 0, GRID_MAX_POINTS_X, (GRID_MAX_POINTS_Y) - 1, 0, false }, // Top of the mesh looking down
info2 PROGMEM = { 0, (GRID_MAX_POINTS_X) - 2, 0, GRID_MAX_POINTS_Y, true }, // Left side of the mesh looking right
info3 PROGMEM = { (GRID_MAX_POINTS_X) - 1, 0, 0, GRID_MAX_POINTS_Y, true }; // Right side of the mesh looking left
info0 PROGMEM = { 0, GRID_MAX_POINTS_X, 0, (GRID_MAX_POINTS_Y) - 2, false }, // Bottom of the mesh looking up
info1 PROGMEM = { 0, GRID_MAX_POINTS_X, (GRID_MAX_POINTS_Y) - 1, 0, false }, // Top of the mesh looking down
info2 PROGMEM = { 0, (GRID_MAX_POINTS_X) - 2, 0, GRID_MAX_POINTS_Y, true }, // Left side of the mesh looking right
info3 PROGMEM = { (GRID_MAX_POINTS_X) - 1, 0, 0, GRID_MAX_POINTS_Y, true }; // Right side of the mesh looking left
static const smart_fill_info * const info[] PROGMEM = { &info0, &info1, &info2, &info3 };

for (uint8_t i = 0; i < COUNT(info); ++i) {
Expand Down Expand Up @@ -1513,7 +1520,7 @@ void unified_bed_leveling::smart_fill_mesh() {
}

probe.stow();
probe.move_z_after_probing();
TERN_(Z_AFTER_PROBING, probe.move_z_after_probing());

if (abort_flag) {
SERIAL_ECHOLNPGM("?Error probing point. Aborting operation.");
Expand Down Expand Up @@ -1599,7 +1606,7 @@ void unified_bed_leveling::smart_fill_mesh() {
}
}
probe.stow();
probe.move_z_after_probing();
TERN_(Z_AFTER_PROBING, probe.move_z_after_probing());

if (abort_flag || finish_incremental_LSF(&lsf_results)) {
SERIAL_ECHOLNPGM("Could not complete LSF!");
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,8 @@ G29_TYPE GcodeSuite::G29() {

int8_t inStart, inStop, inInc;

TERN_(DWIN_LCD_PROUI, if (HMI_flag.cancel_lev) break);

if (zig) { // Zig away from origin
inStart = 0; // Left or front
inStop = PR_INNER_SIZE; // Right or back
Expand Down Expand Up @@ -780,6 +782,7 @@ G29_TYPE GcodeSuite::G29() {

abl.reenable = false; // Don't re-enable after modifying the mesh
idle_no_sleep();
TERN_(DWIN_LCD_PROUI, if (HMI_flag.cancel_lev) break);

} // inner
} // outer
Expand Down Expand Up @@ -985,7 +988,7 @@ G29_TYPE GcodeSuite::G29() {
// Restore state after probing
if (!faux) restore_feedrate_and_scaling();

TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
TERN_(Z_AFTER_PROBING, probe.move_z_after_probing());

#ifdef EVENT_GCODE_AFTER_G29
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29);
Expand Down
108 changes: 86 additions & 22 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ Menu *stepsMenu = nullptr;
#if ENABLED(PROUI_MESH_EDIT)
Menu *editMeshMenu = nullptr;
#endif
Menu *meshInsetMenu = nullptr;
#endif
#if ENABLED(SHAPING_MENU)
Menu *inputShapingMenu = nullptr;
Expand Down Expand Up @@ -1222,7 +1223,7 @@ void drawMainArea() {
case ID_SetPInt:
case ID_SetIntNoDraw:
case ID_SetFloat:
case ID_SetPFloat: ReDrawMenu(true); break;
case ID_SetPFloat: redrawMenu(true); break;
default: break;
}
}
Expand All @@ -1236,6 +1237,12 @@ void hmiWaitForUser() {
if (!wait_for_user) {
switch (checkkey) {
case ID_PrintDone: select_page.reset(); gotoMainMenu(); break;
case ID_Leveling:
hmiFlag.cancel_lev = 1;
dwinDrawStatusLine("Canceling auto leveling...");
dwinUpdateLCD();
case ID_NothingToDo:
break;
default: hmiReturnScreen(); break;
}
}
Expand Down Expand Up @@ -1480,7 +1487,7 @@ void hmiReturnScreen() {

void dwinHomingStart() {
hmiFlag.home_flag = true;
hmiSaveProcessID(ID_Homing);
if (checkkey != ID_NothingToDo) { hmiSaveProcessID(ID_Homing); }
title.showCaption(GET_TEXT_F(MSG_HOMING));
dwinShowPopup(ICON_BLTouch, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT));
}
Expand All @@ -1489,16 +1496,26 @@ void dwinHomingDone() {
hmiFlag.home_flag = false;
if (last_checkkey == ID_PrintDone)
gotoPrintDone();
else
hmiReturnScreen();
else if (checkkey != ID_NothingToDo) { hmiReturnScreen(); }
}

void dwinLevelingStart() {
#if HAS_BED_PROBE
hmiSaveProcessID(ID_Leveling);
title.showCaption(GET_TEXT_F(MSG_BED_LEVELING));
dwinShowPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT));
#if ALL(AUTO_BED_LEVELING_UBL, PREHEAT_BEFORE_LEVELING)
#if HAS_LEVELING
void dwinLevelingStart() {
#if HAS_BED_PROBE
hmiFlag.cancel_lev = 0;
hmiSaveProcessID(ID_Leveling);
title.showCaption(GET_TEXT_F(MSG_BED_LEVELING));
#if ENABLED(AUTO_BED_LEVELING_UBL)
meshViewer.drawMeshGrid(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y);
DWINUI::drawButton(BTN_Cancel, 86, 305);
#else
dwinShowPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT));
#endif
#elif ENABLED(MESH_BED_LEVELING)
drawManualMeshMenu();
#endif

#if ENABLED(PREHEAT_BEFORE_LEVELING)
#if HAS_BED_PROBE
if (!DEBUGGING(DRYRUN)) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, hmiData.bedLevT);
#else
Expand All @@ -1516,14 +1533,23 @@ void dwinLevelingStart() {
#endif
#endif
#endif
#elif ENABLED(MESH_BED_LEVELING)
drawManualMeshMenu();
#endif
}
}

void dwinLevelingDone() {
TERN_(HAS_MESH, gotoMeshViewer(true));
}
void dwinLevelingDone() {
#if HAS_MESH
if (hmiFlag.cancel_lev) {
probe.stow();
reset_bed_level();
hmiReturnScreen();
dwinUpdateLCD();
ui.set_status(F("Mesh was cancelled"));
}
else {
gotoMeshViewer(true);
}
#endif
}
#endif // HAS_LEVELING

#if HAS_MESH
void dwinMeshUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval) {
Expand Down Expand Up @@ -1837,6 +1863,17 @@ void dwinSetDataDefaults() {
#endif
TERN_(ADAPTIVE_STEP_SMOOTHING, hmiData.adaptiveStepSmoothing = true);
TERN_(HAS_GCODE_PREVIEW, hmiData.enablePreview = true);
#if HAS_BED_PROBE
IF_DISABLED(BD_SENSOR, hmiData.multipleProbing = MULTIPLE_PROBING);
hmiData.zprobeFeed = DEF_Z_PROBE_FEEDRATE_SLOW;
#endif
#if HAS_MESH
hmiData.mesh_min_x = DEF_MESH_MIN_X;
hmiData.mesh_max_x = DEF_MESH_MAX_X;
hmiData.mesh_min_y = DEF_MESH_MIN_Y;
hmiData.mesh_max_y = DEF_MESH_MAX_Y;
#endif

}

void dwinCopySettingsTo(char * const buff) {
Expand Down Expand Up @@ -2086,10 +2123,6 @@ void gotoInfoMenu() {

void disableMotors() { queue.inject(F("M84")); }

void autoLevel() { // Always reacquire the Z "home" position
queue.inject(F(TERN(AUTO_BED_LEVELING_UBL, "G29P1", "G29")));
}

void autoHome() { queue.inject_P(G28_STR); }

#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)
Expand Down Expand Up @@ -2283,6 +2316,16 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS,
void setHSMode() { toggleCheckboxLine(bltouch.high_speed_mode); }
#endif

#if DISABLED(BD_SENSOR)
void applyProbeMultiple() { hmiData.multipleProbing = menuData.value; }
void setProbeMultiple() { setIntOnClick(0, 4, hmiData.multipleProbing, applyProbeMultiple); }
#endif

void setProbeZSpeed() { setPIntOnClick(60, 1000); }

void autoLevel() {
queue.inject(F(TERN(AUTO_BED_LEVELING_UBL, "G29P1", "G29")));
}
#endif

#if ENABLED(EDITABLE_DISPLAY_TIMEOUT)
Expand Down Expand Up @@ -3268,6 +3311,8 @@ void drawMoveMenu() {
#if HAS_Z_AXIS
EDIT_ITEM(ICON_ProbeOffsetZ, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, setProbeOffsetZ, &probe.offset.z);
#endif
IF_DISABLED(BD_SENSOR, EDIT_ITEM(ICON_Cancel, MSG_ZPROBE_MULTIPLE, onDrawPInt8Menu, setProbeMultiple, &hmiData.multipleProbing));
EDIT_ITEM(ICON_ProbeZSpeed, MSG_Z_FEED_RATE, onDrawPIntMenu, setProbeZSpeed, &hmiData.zprobeFeed);
#if ENABLED(BLTOUCH)
MENU_ITEM(ICON_ProbeStow, MSG_MANUAL_STOW, onDrawMenuItem, probeStow);
MENU_ITEM(ICON_ProbeDeploy, MSG_MANUAL_DEPLOY, onDrawMenuItem, probeDeploy);
Expand Down Expand Up @@ -4018,6 +4063,9 @@ void drawMaxAccelMenu() {
dwinUpdateLCD();
}

void applyMeshInset() { reset_bed_level(); redrawItem(); }
void setMeshInset() { setPFloatOnClick(X_MIN_POS, X_MAX_POS, UNITFDIGITS, applyMeshInset); }

#if ENABLED(PREHEAT_BEFORE_LEVELING)
void setBedLevT() { setPIntOnClick(MIN_BEDTEMP, MAX_BEDTEMP); }
#endif
Expand Down Expand Up @@ -4078,7 +4126,7 @@ void drawMaxAccelMenu() {

void drawMeshSetMenu() {
checkkey = ID_Menu;
if (SET_MENU(meshMenu, MSG_MESH_LEVELING, 14)) {
if (SET_MENU(meshMenu, MSG_MESH_LEVELING, 15)) {
BACK_ITEM(drawAdvancedSettingsMenu);
#if ENABLED(PREHEAT_BEFORE_LEVELING)
EDIT_ITEM(ICON_Temperature, MSG_UBL_SET_TEMP_BED, onDrawPIntMenu, setBedLevT, &hmiData.bedLevT);
Expand All @@ -4101,6 +4149,7 @@ void drawMaxAccelMenu() {
MENU_ITEM(ICON_MeshEdit, MSG_EDIT_MESH, onDrawSubMenu, drawEditMeshMenu);
#endif
MENU_ITEM(ICON_MeshViewer, MSG_MESH_VIEW, onDrawSubMenu, dwinMeshViewer);
MENU_ITEM(ICON_PrintSize, MSG_MESH_LEVELING, onDrawSubMenu, drawMeshInsetMenu);
}
updateMenu(meshMenu);
}
Expand All @@ -4121,6 +4170,21 @@ void drawMaxAccelMenu() {
}
#endif

void drawMeshInsetMenu() {
checkkey = ID_Menu;
if (SET_MENU(meshInsetMenu, MSG_MESH_INSET, 7)) {
BACK_ITEM(drawMeshSetMenu);
EDIT_ITEM(200 /*ICON_Box*/, MSG_MESH_MIN_X, onDrawPFloatMenu, setMeshInset, &hmiData.mesh_min_x);
EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_X, onDrawPFloatMenu, setMeshInset, &hmiData.mesh_max_x);
EDIT_ITEM(200 /*ICON_Box*/, MSG_MESH_MIN_Y, onDrawPFloatMenu, setMeshInset, &hmiData.mesh_min_y);
EDIT_ITEM(ICON_ProbeMargin, MSG_MESH_MAX_Y, onDrawPFloatMenu, setMeshInset, &hmiData.mesh_max_y);
//MENU_ITEM(254 /*ICON_AxisC*/, MSG_MESH_AMAX, onDrawMenuItem, maxMeshArea);
//MENU_ITEM(ICON_SetHome, MSG_MESH_CENTER, onDrawMenuItem, centerMeshArea);
}
updateMenu(meshInsetMenu);
//LCD_MESSAGE_F("..Center Area sets mesh equidistant by greatest inset from edge.");
}

#endif // HAS_MESH

#endif // DWIN_LCD_PROUI
Loading
Loading