Skip to content

Commit

Permalink
clarify more
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 20, 2023
1 parent 9e862f8 commit 4b74c53
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 40 deletions.
10 changes: 0 additions & 10 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2746,16 +2746,6 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#error "DWIN_LCD_PROUI requires SDSUPPORT to be enabled."
#elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY)
#error "DWIN_LCD_PROUI does not support LCD_BED_LEVELING with PROBE_MANUALLY."
#elif ENABLED(MEDIASORT_MENU_ITEM) && !ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE)
#error "MEDIASORT_MENU_ITEM requires SDCARD_SORT_ALPHA and SDSORT_GCODE."
#elif ENABLED(RUNOUT_TUNE_ITEM) && DISABLED(HAS_FILAMENT_SENSOR)
#error "RUNOUT_TUNE_ITEM requires HAS_FILAMENT_SENSOR."
#elif ENABLED(PLR_TUNE_ITEM) && DISABLED(POWER_LOSS_RECOVERY)
#error "PLR_TUNE_ITEM requires POWER_LOSS_RECOVERY."
#elif ENABLED(JD_TUNE_ITEM) && DISABLED(HAS_JUNCTION_DEVIATION)
#error "JD_TUNE_ITEM requires HAS_JUNCTION_DEVIATION."
#elif ENABLED(ADVK_TUNE_ITEM) && DISABLED(LIN_ADVANCE)
#error "ADVK_TUNE_ITEM requires LIN_ADVANCE."
#endif
#endif

Expand Down
20 changes: 10 additions & 10 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Menu *stepsMenu = nullptr;
#endif
#if HAS_MESH
Menu *meshMenu = nullptr;
#if ENABLED(PROUI_MESH_EDIT_MENU)
#if ENABLED(PROUI_MESH_EDIT)
Menu *editMeshMenu = nullptr;
#endif
#endif
Expand Down Expand Up @@ -847,7 +847,7 @@ void updateVariable() {

bool DWIN_lcd_sd_status = false;

#if ENABLED(MEDIASORT_MENU_ITEM)
#if ENABLED(PROUI_MEDIASORT)
void setMediaSort() {
toggleCheckboxLine(hmiData.mediaSort);
card.setSortOn(hmiData.mediaSort ? TERN(SDSORT_REVERSE, AS_REV, AS_FWD) : AS_OFF);
Expand Down Expand Up @@ -1759,7 +1759,7 @@ void dwinSetDataDefaults() {
#if ALL(LCD_BED_TRAMMING, HAS_BED_PROBE)
hmiData.fullManualTramming = DISABLED(BED_TRAMMING_USE_PROBE);
#endif
#if ENABLED(MEDIASORT_MENU_ITEM)
#if ENABLED(PROUI_MEDIASORT)
hmiData.mediaSort = true;
card.setSortOn(TERN(SDSORT_REVERSE, AS_REV, AS_FWD));
#endif
Expand Down Expand Up @@ -3130,7 +3130,7 @@ void drawAdvancedSettingsMenu() {
#if HAS_GCODE_PREVIEW
EDIT_ITEM(ICON_File, MSG_HAS_PREVIEW, onDrawChkbMenu, setPreview, &hmiData.enablePreview);
#endif
#if ENABLED(MEDIASORT_MENU_ITEM)
#if ENABLED(PROUI_MEDIASORT)
EDIT_ITEM(ICON_File, MSG_MEDIA_SORT, onDrawChkbMenu, setMediaSort, &hmiData.mediaSort);
#endif
EDIT_ITEM(ICON_File, MSG_MEDIA_UPDATE, onDrawChkbMenu, setMediaAutoMount, &hmiData.mediaAutoMount);
Expand Down Expand Up @@ -3323,16 +3323,16 @@ void drawTuneMenu() {
#if HAS_FILAMENT_SENSOR
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_ENABLE, onDrawChkbMenu, setRunoutEnable, &runout.enabled);
#endif
#if ENABLED(PLR_TUNE_ITEM)
#if ENABLED(PROUI_ITEM_PLR)
EDIT_ITEM(ICON_Pwrlossr, MSG_OUTAGE_RECOVERY, onDrawChkbMenu, setPwrLossr, &recovery.enabled);
#endif
#if ENABLED(FWRETRACT)
MENU_ITEM(ICON_FWRetract, MSG_FWRETRACT, onDrawSubMenu, drawFWRetractMenu);
#endif
#if ENABLED(JD_TUNE_ITEM)
#if ENABLED(PROUI_ITEM_JD)
EDIT_ITEM(ICON_JDmm, MSG_JUNCTION_DEVIATION, onDrawPFloat3Menu, setJDmm, &planner.junction_deviation_mm);
#endif
#if ENABLED(ADVK_TUNE_ITEM)
#if ENABLED(PROUI_ITEM_ADVK)
EDIT_ITEM(ICON_MaxAccelerated, MSG_ADVANCE_K, onDrawPFloat3Menu, setLA_K, &planner.extruder_advance_K[0]);
#endif
#if HAS_LOCKSCREEN
Expand Down Expand Up @@ -3952,7 +3952,7 @@ void drawStepsMenu() {
void setBedLevT() { setPIntOnClick(MIN_BEDTEMP, MAX_BEDTEMP); }
#endif

#if ENABLED(PROUI_MESH_EDIT_MENU)
#if ENABLED(PROUI_MESH_EDIT)
#define Z_OFFSET_MIN -3
#define Z_OFFSET_MAX 3

Expand Down Expand Up @@ -4029,7 +4029,7 @@ void drawStepsMenu() {
MENU_ITEM(ICON_UBLTiltGrid, MSG_UBL_TILT_MESH, onDrawMenuItem, ublMeshTilt);
MENU_ITEM(ICON_UBLSmartFill, MSG_UBL_SMART_FILLIN, onDrawMenuItem, ublSmartFillMesh);
#endif
#if ENABLED(PROUI_MESH_EDIT_MENU)
#if ENABLED(PROUI_MESH_EDIT)
MENU_ITEM(ICON_MeshReset, MSG_MESH_RESET, onDrawMenuItem, ResetMesh);
MENU_ITEM(ICON_MeshEdit, MSG_EDIT_MESH, onDrawSubMenu, drawEditMeshMenu);
#endif
Expand All @@ -4038,7 +4038,7 @@ void drawStepsMenu() {
updateMenu(meshMenu);
}

#if ENABLED(PROUI_MESH_EDIT_MENU)
#if ENABLED(PROUI_MESH_EDIT)
void drawEditMeshMenu() {
if (!leveling_is_valid()) { LCD_MESSAGE(MSG_UBL_MESH_INVALID); return; }
set_bed_leveling_enabled(false);
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/e3v2/proui/dwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ typedef struct {
#if ALL(LCD_BED_TRAMMING, HAS_BED_PROBE)
bool fullManualTramming = false;
#endif
#if ENABLED(MEDIASORT_MENU_ITEM)
#if ENABLED(PROUI_MEDIASORT)
bool mediaSort = true;
#endif
bool mediaAutoMount = ENABLED(HAS_SD_EXTENDER);
Expand Down Expand Up @@ -343,7 +343,7 @@ void drawStepsMenu();
#endif
#if HAS_MESH
void drawMeshSetMenu();
#if ENABLED(PROUI_MESH_EDIT_MENU)
#if ENABLED(PROUI_MESH_EDIT)
void drawEditMeshMenu();
#endif
#endif
Expand Down
26 changes: 8 additions & 18 deletions Marlin/src/lcd/e3v2/proui/dwin_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,33 +79,23 @@
#define DEF_PIDCYCLES 5

/**
* ProUI Menu Options
* Choose which feature you would like to Enable or Disable
*/
#if ENABLED(SDCARD_SORT_ALPHA)
#define MEDIASORT_MENU_ITEM
#if ENABLED(MEDIASORT_MENU_ITEM) && (SDSORT_GCODE == false)
// MEDIASORT_MENU_ITEM needs SDSORT_GCODE to be 'true'
#undef SDSORT_GCODE
#define SDSORT_GCODE true
#endif
#endif
#if ENABLED(HAS_FILAMENT_SENSOR)
#define RUNOUT_TUNE_ITEM
* ProUI internal feature flags
*/
#if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE)
#define PROUI_MEDIASORT
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
#define PLR_TUNE_ITEM // Power-loss Recovery option in Tune Menu
#define PROUI_ITEM_PLR // Tune > Power-loss Recovery
#endif
#if ENABLED(HAS_JUNCTION_DEVIATION)
#define JD_TUNE_ITEM // Juntion Deviation item in Tune Menu
#define PROUI_ITEM_JD // Tune > Junction Deviation
#endif
#if ENABLED(LIN_ADVANCE)
#define ADVK_TUNE_ITEM // Linear Advance item in Tune Menu
#define PROUI_ITEM_ADVK // Tune > Linear Advance
#endif
#if HAS_MESH
#define PROUI_MESH_EDIT_MENU // Add a menu to edit mesh points
#define PROUI_MESH_EDIT // Add a menu to edit mesh points
#endif

#define HAS_GCODE_PREVIEW 1
#define HAS_CUSTOM_COLORS 1 // Change display colors
#define HAS_ESDIAG 1 // View End-stop/Runout switch continuity
Expand Down

0 comments on commit 4b74c53

Please sign in to comment.