Followup to endstops tweaks

This commit is contained in:
Scott Lahteine 2018-05-22 20:34:59 -05:00
parent d98bc71af7
commit ee333f6be2
2 changed files with 12 additions and 16 deletions

View file

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

View file

@ -180,12 +180,6 @@
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad & KEYPAD_HOME) #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad & KEYPAD_HOME)
#define REPRAPWORLD_KEYPAD_MOVE_MENU (buttons_reprapworld_keypad & KEYPAD_EN_C) #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 & ( \ #define REPRAPWORLD_KEYPAD_PRESSED (buttons_reprapworld_keypad & ( \
EN_REPRAPWORLD_KEYPAD_F3 | \ EN_REPRAPWORLD_KEYPAD_F3 | \
EN_REPRAPWORLD_KEYPAD_F2 | \ EN_REPRAPWORLD_KEYPAD_F2 | \
@ -197,14 +191,6 @@
EN_REPRAPWORLD_KEYPAD_LEFT) \ EN_REPRAPWORLD_KEYPAD_LEFT) \
) )
#elif defined(EN_C)
#define LCD_CLICKED (buttons & EN_C)
#else
#define LCD_CLICKED false
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION) #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
@ -259,6 +245,18 @@
#endif #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_MESSAGEPGM(x) lcd_setstatusPGM(PSTR(x))
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatusPGM(PSTR(x)) #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatusPGM(PSTR(x))