Skip to content

Commit 87e4505

Browse files
Ignore button long press if not allowed
1 parent 96b9048 commit 87e4505

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Firmware/ultralcd.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -8048,7 +8048,7 @@ void menu_lcd_longpress_func(void)
80488048
// explicitely listed menus which are allowed to rise the move-z or live-adj-z functions
80498049
// The lists are not the same for both functions, so first decide which function is to be performed
80508050
if ( (moves_planned() || IS_SD_PRINTING || usb_timer.running() )){ // long press as live-adj-z
8051-
if(( current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU ) // only allow live-adj-z up to 2mm of print height
8051+
if (( current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU ) // only allow live-adj-z up to 2mm of print height
80528052
&& ( menu_menu == lcd_status_screen // and in listed menus...
80538053
|| menu_menu == lcd_main_menu
80548054
|| menu_menu == lcd_tune_menu
@@ -8058,12 +8058,10 @@ void menu_lcd_longpress_func(void)
80588058
lcd_clear();
80598059
menu_submenu(lcd_babystep_z);
80608060
} else {
8061-
// otherwise consume the long press as normal click
8062-
if( menu_menu != lcd_status_screen )
8063-
menu_back();
8061+
lcd_quick_feedback();
80648062
}
80658063
} else { // long press as move-z
8066-
if(menu_menu == lcd_status_screen
8064+
if (menu_menu == lcd_status_screen
80678065
|| menu_menu == lcd_main_menu
80688066
|| menu_menu == lcd_preheat_menu
80698067
|| menu_menu == lcd_sdcard_menu
@@ -8076,9 +8074,7 @@ void menu_lcd_longpress_func(void)
80768074
){
80778075
menu_submenu(lcd_move_z);
80788076
} else {
8079-
// otherwise consume the long press as normal click
8080-
if( menu_menu != lcd_status_screen )
8081-
menu_back();
8077+
lcd_quick_feedback();
80828078
}
80838079
}
80848080
}

0 commit comments

Comments
 (0)