0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-15 02:36:19 +00:00

General lcd code cleanup

This commit is contained in:
Scott Lahteine 2018-05-01 01:08:39 -05:00
parent 3c5f0ce858
commit 94857b59c9

View file

@ -789,9 +789,9 @@ void lcd_buzz(const long duration, const uint16_t freq) {
} }
void lcd_quick_feedback(const bool clear_buttons) { void lcd_quick_feedback(const bool clear_buttons) {
lcd_refresh();
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
lcd_refresh();
if (clear_buttons) buttons = 0; if (clear_buttons) buttons = 0;
next_button_update_ms = millis() + 500; next_button_update_ms = millis() + 500;
#else #else
@ -800,10 +800,13 @@ void lcd_quick_feedback(const bool clear_buttons) {
// Buzz and wait. The delay is needed for buttons to settle! // Buzz and wait. The delay is needed for buttons to settle!
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#if ENABLED(LCD_USE_I2C_BUZZER)
delay(10); #if ENABLED(ULTIPANEL)
#elif PIN_EXISTS(BEEPER) #if ENABLED(LCD_USE_I2C_BUZZER)
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } delay(10);
#elif PIN_EXISTS(BEEPER)
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
#endif
#endif #endif
} }
@ -917,7 +920,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
END_MENU(); END_MENU();
} }
#endif #endif // POWER_LOSS_RECOVERY
#if ENABLED(MENU_ITEM_CASE_LIGHT) #if ENABLED(MENU_ITEM_CASE_LIGHT)