diff --git a/Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h b/Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h index 9dc1b54310..8d0a47ce84 100644 --- a/Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h +++ b/Marlin/src/lcd/HD44780/ultralcd_common_HD44780.h @@ -60,9 +60,9 @@ #if BUTTON_EXISTS(ENC) // the pause/stop/restart button is connected to BTN_ENC when used #define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name - #define LCD_CLICKED (buttons & (B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop. + #define LCD_CLICKED() (buttons & (B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop. #else - #define LCD_CLICKED (buttons & (B_MI|B_RI)) + #define LCD_CLICKED() (buttons & (B_MI|B_RI)) #endif // I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update @@ -77,7 +77,7 @@ #define B_MI (PANELOLU2_ENCODER_C << B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later #undef LCD_CLICKED - #define LCD_CLICKED (buttons & B_MI) + #define LCD_CLICKED() (buttons & B_MI) // I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update #define LCD_HAS_SLOW_BUTTONS @@ -98,7 +98,7 @@ #define B_DW (_BV(BL_DW)) #define B_RI (_BV(BL_RI)) #define B_ST (_BV(BL_ST)) - #define LCD_CLICKED (buttons & (B_MI|B_ST)) + #define LCD_CLICKED() (buttons & (B_MI|B_ST)) #endif #if ENABLED(AUTO_BED_LEVELING_UBL) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index e6452b2acf..4c246b7ae0 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -660,7 +660,7 @@ void lcd_update() { // Handle any queued Move Axis motion manage_manual_move(); - // Update button states for LCD_CLICKED, etc. + // Update button states for LCD_CLICKED(), etc. // After state changes the next button update // may be delayed 300-500ms. lcd_buttons_update(); @@ -673,7 +673,7 @@ void lcd_update() { #endif // If the action button is pressed... - if (UBL_CONDITION && LCD_CLICKED) { + if (UBL_CONDITION && LCD_CLICKED()) { if (!wait_for_unclick) { // If not waiting for a debounce release: wait_for_unclick = true; // Set debounce flag to ignore continous clicks lcd_clicked = !wait_for_user && !no_reentry; // Keep the click if not waiting for a user-click @@ -1102,7 +1102,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; } #endif #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION) - bool is_lcd_clicked() { return LCD_CLICKED; } + bool is_lcd_clicked() { return LCD_CLICKED(); } void wait_for_release() { while (is_lcd_clicked()) safe_delay(50); safe_delay(50); diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index f7d2e3a773..b6aa0091c2 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -409,14 +409,14 @@ #if ENABLED(REPRAPWORLD_KEYPAD) #ifdef EN_C - #define LCD_CLICKED ((buttons & EN_C) || REPRAPWORLD_KEYPAD_MOVE_MENU) + #define LCD_CLICKED() ((buttons & EN_C) || REPRAPWORLD_KEYPAD_MOVE_MENU) #else - #define LCD_CLICKED REPRAPWORLD_KEYPAD_MOVE_MENU + #define LCD_CLICKED() REPRAPWORLD_KEYPAD_MOVE_MENU #endif #elif defined(EN_C) - #define LCD_CLICKED (buttons & EN_C) + #define LCD_CLICKED() (buttons & EN_C) #else - #define LCD_CLICKED false + #define LCD_CLICKED() false #endif extern uint8_t lcd_status_update_delay;