don't play startup tune if buzzer pref disabled

This commit is contained in:
liamcottle
2026-05-02 01:47:35 +12:00
parent ccda0a99d8
commit 5a509752a7
3 changed files with 2 additions and 1 deletions
@@ -575,6 +575,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
#ifdef PIN_BUZZER
buzzer.begin();
buzzer.quiet(_node_prefs->buzzer_quiet);
buzzer.startup();
#endif
#ifdef PIN_VIBRATION
@@ -57,6 +57,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
#ifdef PIN_BUZZER
buzzer.begin();
buzzer.quiet(_node_prefs->buzzer_quiet);
buzzer.startup();
#endif
// Initialize digital button if available
-1
View File
@@ -12,7 +12,6 @@ void genericBuzzer::begin() {
quiet(false);
pinMode(PIN_BUZZER, OUTPUT);
digitalWrite(PIN_BUZZER, LOW); // need to pull low by default to avoid extreme power draw
startup();
}
void genericBuzzer::play(const char *melody) {