Merge pull request #4265 from thinkyhead/rc_buzzer_patchup
Two strategies to address a stuck buzzer
This commit is contained in:
commit
6121c9018a
2 changed files with 10 additions and 8 deletions
|
|
@ -2334,12 +2334,14 @@ void kill_screen(const char* lcd_msg) {
|
|||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
next_button_update_ms = millis() + 500;
|
||||
|
||||
// Buzz and wait. The delay is needed for buttons to settle!
|
||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||
lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
|
||||
delay(10);
|
||||
#elif PIN_EXISTS(BEEPER)
|
||||
buzzer.tone(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
|
||||
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
|
||||
#endif
|
||||
delay(10); // needed for buttons to settle
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue