Merge pull request #1130 from zaquaz/buzzer-feature-pr

Added buzzer config persistance across restart
This commit is contained in:
ripplebiz
2025-11-27 16:04:44 +11:00
committed by GitHub
5 changed files with 12 additions and 2 deletions

View File

@@ -532,6 +532,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
#ifdef PIN_BUZZER
buzzer.begin();
buzzer.quiet(_node_prefs->buzzer_quiet);
#endif
#ifdef PIN_VIBRATION
@@ -872,6 +873,8 @@ void UITask::toggleBuzzer() {
buzzer.quiet(true);
showAlert("Buzzer: OFF", 800);
}
_node_prefs->buzzer_quiet = buzzer.isQuiet();
the_mesh.savePrefs();
_next_refresh = 0; // trigger refresh
#endif
}