1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 05:48:43 +00:00

Allow disable of LCD click

This commit is contained in:
Scott Lahteine 2020-05-27 13:12:08 -05:00
parent a49319f3dd
commit 3bf0d8d161
3 changed files with 15 additions and 15 deletions

View File

@ -1882,6 +1882,9 @@
#endif
#if PIN_EXISTS(BEEPER) || EITHER(LCD_USE_I2C_BUZZER, PCA9632_BUZZER)
#define HAS_BUZZER 1
#if LCD_FEEDBACK_FREQUENCY_DURATION_MS && LCD_FEEDBACK_FREQUENCY_HZ
#define HAS_CHIRP 1
#endif
#endif
#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER, PCA9632_BUZZER)
#define USE_BEEPER 1

View File

@ -612,17 +612,14 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
UNUSED(clear_buttons);
#endif
#if HAS_BUZZER
// Buzz and wait. Is the delay needed for buttons to settle?
buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#if HAS_LCD_MENU
#if USE_BEEPER
#if HAS_CHIRP
chirp(); // Buzz and wait. Is the delay needed for buttons to settle?
#if BOTH(HAS_LCD_MENU, USE_BEEPER)
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
#else
#elif HAS_LCD_MENU
delay(10);
#endif
#endif
#endif
}
////////////////////////////////////////////

View File

@ -398,6 +398,12 @@ public:
static millis_t next_filament_display;
#endif
FORCE_INLINE static void chirp() {
#if HAS_CHIRP
buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#endif
}
static void quick_feedback(const bool clear_buttons=true);
#if HAS_BUZZER
static void completion_feedback(const bool good=true);
@ -524,12 +530,6 @@ public:
static void reselect_last_file();
#endif
#if ENABLED(G26_MESH_VALIDATION)
FORCE_INLINE static void chirp() {
TERN_(HAS_BUZZER, buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ));
}
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
static void ubl_plot(const uint8_t x_plot, const uint8_t y_plot);
#endif