diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 23df71cc44..e1ccdacfa6 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -67,7 +67,6 @@ #define EN_B BIT(BLEN_B) #define EN_A BIT(BLEN_A) - #define LCD_CLICKED (buttons&EN_C) #if ENABLED(REPRAPWORLD_KEYPAD) #define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3)) #define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2)) @@ -86,6 +85,8 @@ #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN) #define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP) #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE) + #else + #define LCD_CLICKED (buttons&EN_C) #endif //REPRAPWORLD_KEYPAD #else //atomic, do not change diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 0ba411cf8e..b159e3d1ae 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -49,8 +49,10 @@ #if defined(BTN_ENC) && BTN_ENC > -1 // 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 + #undef LCD_CLICKED #define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop. #else + #undef LCD_CLICKED #define LCD_CLICKED (buttons&(B_MI|B_RI)) #endif @@ -64,11 +66,13 @@ #define B_MI (PANELOLU2_ENCODER_C< 0) leds |= LED_A; - if (target_temperature[0] > 0) leds |= LED_B; - if (fanSpeed) leds |= LED_C; - #if EXTRUDERS > 1 - if (target_temperature[1] > 0) leds |= LED_C; - #endif - if (leds != ledsprev) { - lcd.setBacklight(leds); - ledsprev = leds; - } + // Set the LEDS - referred to as backlights by the LiquidTWI2 library + static uint8_t ledsprev = 0; + uint8_t leds = 0; + if (target_temperature_bed > 0) leds |= LED_A; + if (target_temperature[0] > 0) leds |= LED_B; + if (fanSpeed) leds |= LED_C; + #if EXTRUDERS > 1 + if (target_temperature[1] > 0) leds |= LED_C; #endif + if (leds != ledsprev) { + lcd.setBacklight(leds); + ledsprev = leds; + } } #endif // LCD_HAS_STATUS_INDICATORS