Skip to content

Commit

Permalink
apply some config options
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 26, 2022
1 parent ad73f1b commit 94fd41e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
37 changes: 23 additions & 14 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ MenuClass *BedPIDMenu = nullptr;
#endif
#if HAS_MESH
MenuClass *MeshMenu = nullptr;
MenuClass *EditMeshMenu = nullptr;
#if ENABLED(MESH_EDIT_MENU)
MenuClass *EditMeshMenu = nullptr;
#endif
#endif

// Updatable menuitems pointers
Expand Down Expand Up @@ -3624,6 +3626,7 @@ void Draw_Steps_Menu() {
#endif

#if ENABLED(AUTO_BED_LEVELING_UBL)

void ApplyUBLSlot() { ubl.storage_slot = MenuData.Value; }
void SetUBLSlot() { SetIntOnClick (0, settings.calc_num_meshes() - 1, ubl.storage_slot, ApplyUBLSlot); }
void onDrawUBLSlot(MenuItemClass* menuitem, int8_t line) {
Expand Down Expand Up @@ -3678,7 +3681,7 @@ void Draw_Steps_Menu() {
}
}

#endif
#endif // AUTO_BED_LEVELING_UBL

#if HAS_MESH
void Draw_MeshSet_Menu() {
Expand All @@ -3701,22 +3704,28 @@ void Draw_Steps_Menu() {
MENU_ITEM_F(ICON_UBLActive, MSG_UBL_TILT_MESH, onDrawMenuItem, UBLTiltMesh);
MENU_ITEM_F(ICON_UBLActive, MSG_UBL_SMART_FILLIN, onDrawMenuItem, UBLSmartFillMesh);
#endif
MENU_ITEM_F(ICON_UBLActive, MSG_EDIT_MESH, onDrawSubMenu, Draw_EditMesh_Menu);
#if ENABLED(MESH_EDIT_MENU)
MENU_ITEM_F(ICON_UBLActive, MSG_EDIT_MESH, onDrawSubMenu, Draw_EditMesh_Menu);
#endif
MENU_ITEM_F(ICON_MeshViewer, MSG_MESH_VIEW, onDrawSubMenu, DWIN_MeshViewer);
}
UpdateMenu(MeshMenu);
}

void Draw_EditMesh_Menu() {
checkkey = Menu;
if (SetMenu(EditMeshMenu, GET_TEXT_F(MSG_EDIT_MESH), 4)) {
mesh_x = mesh_y = 0;
BACK_ITEM(Draw_MeshSet_Menu);
EDIT_ITEM_F(ICON_UBLActive, MSG_MESH_X, onDrawPInt8Menu, SetEditMeshX, &mesh_x);
EDIT_ITEM_F(ICON_UBLActive, MSG_MESH_Y, onDrawPInt8Menu, SetEditMeshY, &mesh_y);
EditZValueItem = EDIT_ITEM_F(ICON_UBLActive, MSG_MESH_EDIT_Z, onDrawPFloat3Menu, SetEditZValue, &Z_VALUES_ARR[mesh_x][mesh_y]);
#if ENABLED(MESH_EDIT_MENU)
void Draw_EditMesh_Menu() {
checkkey = Menu;
if (SetMenu(EditMeshMenu, GET_TEXT_F(MSG_EDIT_MESH), 4)) {
mesh_x = mesh_y = 0;
BACK_ITEM(Draw_MeshSet_Menu);
EDIT_ITEM_F(ICON_UBLActive, MSG_MESH_X, onDrawPInt8Menu, SetEditMeshX, &mesh_x);
EDIT_ITEM_F(ICON_UBLActive, MSG_MESH_Y, onDrawPInt8Menu, SetEditMeshY, &mesh_y);
EditZValueItem = EDIT_ITEM_F(ICON_UBLActive, MSG_MESH_EDIT_Z, onDrawPFloat3Menu, SetEditZValue, &Z_VALUES_ARR[mesh_x][mesh_y]);
}
UpdateMenu(EditMeshMenu);
}
UpdateMenu(EditMeshMenu);
}
#endif
#endif

#endif // HAS_MESH

#endif // DWIN_LCD_PROUI
4 changes: 3 additions & 1 deletion Marlin/src/lcd/e3v2/proui/dwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,7 @@ void Draw_Steps_Menu();
#endif
#if HAS_MESH
void Draw_MeshSet_Menu();
void Draw_EditMesh_Menu();
#if ENABLED(MESH_EDIT_MENU)
void Draw_EditMesh_Menu();
#endif
#endif

0 comments on commit 94fd41e

Please sign in to comment.