Add support for BACK button (if any) (#9836)
This commit is contained in:
parent
1eb3364ac9
commit
2bde53bd46
3 changed files with 32 additions and 12 deletions
|
|
@ -4847,11 +4847,9 @@ void lcd_init() {
|
|||
#if BUTTON_EXISTS(EN1)
|
||||
SET_INPUT_PULLUP(BTN_EN1);
|
||||
#endif
|
||||
|
||||
#if BUTTON_EXISTS(EN2)
|
||||
SET_INPUT_PULLUP(BTN_EN2);
|
||||
#endif
|
||||
|
||||
#if BUTTON_EXISTS(ENC)
|
||||
SET_INPUT_PULLUP(BTN_ENC);
|
||||
#endif
|
||||
|
|
@ -4996,6 +4994,14 @@ void lcd_update() {
|
|||
}
|
||||
}
|
||||
else wait_for_unclick = false;
|
||||
|
||||
#if BUTTON_EXISTS(BACK)
|
||||
if (LCD_BACK_CLICKED) {
|
||||
lcd_quick_feedback();
|
||||
lcd_goto_previous_menu();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
|
||||
|
|
@ -5367,6 +5373,9 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
|||
#if BUTTON_EXISTS(ENC)
|
||||
if (BUTTON_PRESSED(ENC)) newbutton |= EN_C;
|
||||
#endif
|
||||
#if BUTTON_EXISTS(BACK)
|
||||
if (BUTTON_PRESSED(BACK)) newbutton |= EN_D;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Directional buttons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue