Skip to content

Commit

Permalink
Fix long-press LCD inactivity timeout
Browse files Browse the repository at this point in the history
Fixes MarlinFirmware#3715

When a long-press is triggered, the LCD inactivity timer
needs to be restarted. This is done with lcd_timeoutToStatus.start()

This also fixes situations where a long-press is triggered, and the timer
times out immediately (because it was not reset properly)

Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
  • Loading branch information
gudnimg authored and 3d-gussner committed Nov 7, 2022
1 parent 5355f51 commit e9b7763
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7638,7 +7638,10 @@ uint8_t get_message_level()

void menu_lcd_longpress_func(void)
{
backlight_wake();
// Wake up the LCD backlight and,
// start LCD inactivity timer
lcd_timeoutToStatus.start();
backlight_wake();
if (homing_flag || mesh_bed_leveling_flag || menu_menu == lcd_babystep_z || menu_menu == lcd_move_z || menu_block_mask != MENU_BLOCK_NONE)
{
// disable longpress during re-entry, while homing, calibration or if a serious error
Expand Down

0 comments on commit e9b7763

Please sign in to comment.