don't play startup tune if buzzer pref disabled

此提交包含在:
liamcottle
2026-05-02 01:47:35 +12:00
父節點 ccda0a99d8
當前提交 5a509752a7
共有 3 個檔案被更改,包括 2 行新增1 行删除
+1
查看文件
@@ -575,6 +575,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
#ifdef PIN_BUZZER #ifdef PIN_BUZZER
buzzer.begin(); buzzer.begin();
buzzer.quiet(_node_prefs->buzzer_quiet); buzzer.quiet(_node_prefs->buzzer_quiet);
buzzer.startup();
#endif #endif
#ifdef PIN_VIBRATION #ifdef PIN_VIBRATION
+1
查看文件
@@ -57,6 +57,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
#ifdef PIN_BUZZER #ifdef PIN_BUZZER
buzzer.begin(); buzzer.begin();
buzzer.quiet(_node_prefs->buzzer_quiet); buzzer.quiet(_node_prefs->buzzer_quiet);
buzzer.startup();
#endif #endif
// Initialize digital button if available // Initialize digital button if available
-1
查看文件
@@ -12,7 +12,6 @@ void genericBuzzer::begin() {
quiet(false); quiet(false);
pinMode(PIN_BUZZER, OUTPUT); pinMode(PIN_BUZZER, OUTPUT);
digitalWrite(PIN_BUZZER, LOW); // need to pull low by default to avoid extreme power draw digitalWrite(PIN_BUZZER, LOW); // need to pull low by default to avoid extreme power draw
startup();
} }
void genericBuzzer::play(const char *melody) { void genericBuzzer::play(const char *melody) {