From 8015442389db103668346944072e5c70ec5039a4 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 12 Oct 2023 01:11:42 -0400 Subject: [PATCH] Fix Backlight/Tick interfere (#77) --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index bad18c5363..a150951238 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -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) @@ -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); @@ -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); @@ -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);