Skip to content

Commit

Permalink
Fix Backlight/Tick interfere (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
classicrocker883 committed Oct 12, 2023
1 parent 4d4fc18 commit 8015442
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2606,7 +2606,8 @@ void ApplyMove() {
#endif

#if LCD_BACKLIGHT_TIMEOUT_MINS
void SetTimer() { SetPIntOnClick(ui.backlight_timeout_min, ui.backlight_timeout_max); }
void ApplyTimer() { ui.backlight_timeout_minutes = MenuData.Value; }
void SetTimer() { SetIntOnClick(ui.backlight_timeout_min, ui.backlight_timeout_max, ui.backlight_timeout_minutes, ApplyTimer); }
#endif

#if PROUI_EX && ENABLED(NOZZLE_PARK_FEATURE)
Expand Down Expand Up @@ -3487,7 +3488,7 @@ void Draw_Tune_Menu() {
EDIT_ITEM(ICON_MaxAccelerated, MSG_ADVANCE_K, onDrawPFloat3Menu, SetLA_K, &planner.extruder_advance_K[0]);
#endif
#if LCD_BACKLIGHT_TIMEOUT_MINS
EDIT_ITEM(ICON_Box, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, SetTimer, &ui.backlight_timeout_minutes);
EDIT_ITEM(ICON_Box, MSG_SCREEN_TIMEOUT, onDrawPInt8Menu, SetTimer, &ui.backlight_timeout_minutes);
#endif
#if HAS_LCD_BRIGHTNESS
EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, SetBrightness, &ui.brightness);
Expand Down Expand Up @@ -4502,7 +4503,7 @@ void Draw_AdvancedSettings_Menu() {
EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, SetBrightness, &ui.brightness);
#endif
#if LCD_BACKLIGHT_TIMEOUT_MINS
EDIT_ITEM(ICON_Box, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, SetTimer, &ui.backlight_timeout_minutes);
EDIT_ITEM(ICON_Box, MSG_SCREEN_TIMEOUT, onDrawPInt8Menu, SetTimer, &ui.backlight_timeout_minutes);
#endif
#if BED_SCREW_INSET
EDIT_ITEM_F(ICON_ProbeMargin, "Bed Screw Inset", onDrawPFloatMenu, SetRetractSpeed, &ui.screw_pos);
Expand Down Expand Up @@ -4557,7 +4558,7 @@ void Draw_Advanced_Menu() { // From Control_Menu (Control) || Default-NP Advance
EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, SetBrightness, &ui.brightness);
#endif
#if LCD_BACKLIGHT_TIMEOUT_MINS
EDIT_ITEM(ICON_Box, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, SetTimer, &ui.backlight_timeout_minutes);
EDIT_ITEM(ICON_Box, MSG_SCREEN_TIMEOUT, onDrawPInt8Menu, SetTimer, &ui.backlight_timeout_minutes);
#endif
#if BED_SCREW_INSET
EDIT_ITEM_F(ICON_ProbeMargin, "Bed Screw Inset", onDrawPFloatMenu, SetRetractSpeed, &ui.screw_pos);
Expand Down

0 comments on commit 8015442

Please sign in to comment.