General lcd code cleanup
This commit is contained in:
@@ -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,11 +800,14 @@ 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(ULTIPANEL)
|
||||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||||
delay(10);
|
delay(10);
|
||||||
#elif PIN_EXISTS(BEEPER)
|
#elif PIN_EXISTS(BEEPER)
|
||||||
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
|
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(ULTIPANEL)
|
#if ENABLED(ULTIPANEL)
|
||||||
@@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user