Followup to LCD button tweak

This commit is contained in:
Scott Lahteine 2018-05-22 18:28:02 -05:00
parent c76a466ba9
commit 0a0f2a5857
2 changed files with 12 additions and 16 deletions

View File

@ -5503,11 +5503,9 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#if BUTTON_EXISTS(EN1)
if (BUTTON_PRESSED(EN1)) newbutton |= EN_A;
#endif
#if BUTTON_EXISTS(EN2)
if (BUTTON_PRESSED(EN2)) newbutton |= EN_B;
#endif
#if BUTTON_EXISTS(ENC)
if (BUTTON_PRESSED(ENC)) newbutton |= EN_C;
#endif

View File

@ -178,12 +178,6 @@
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad & KEYPAD_HOME)
#define REPRAPWORLD_KEYPAD_MOVE_MENU (buttons_reprapworld_keypad & KEYPAD_EN_C)
#if BUTTON_EXISTS(ENC)
#define LCD_CLICKED ((buttons & EN_C) || REPRAPWORLD_KEYPAD_MOVE_MENU)
#else
#define LCD_CLICKED REPRAPWORLD_KEYPAD_MOVE_MENU
#endif
#define REPRAPWORLD_KEYPAD_PRESSED (buttons_reprapworld_keypad & ( \
EN_REPRAPWORLD_KEYPAD_F3 | \
EN_REPRAPWORLD_KEYPAD_F2 | \
@ -195,14 +189,6 @@
EN_REPRAPWORLD_KEYPAD_LEFT) \
)
#elif defined(EN_C)
#define LCD_CLICKED (buttons & EN_C)
#else
#define LCD_CLICKED false
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
@ -257,6 +243,18 @@
#endif
#if ENABLED(REPRAPWORLD_KEYPAD)
#ifdef EN_C
#define LCD_CLICKED ((buttons & EN_C) || REPRAPWORLD_KEYPAD_MOVE_MENU)
#else
#define LCD_CLICKED REPRAPWORLD_KEYPAD_MOVE_MENU
#endif
#elif defined(EN_C)
#define LCD_CLICKED (buttons & EN_C)
#else
#define LCD_CLICKED false
#endif
#define LCD_MESSAGEPGM(x) lcd_setstatusPGM(PSTR(x))
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatusPGM(PSTR(x))