Added buzzer config persistance accross restart

This commit is contained in:
zaquaz
2025-11-20 18:55:39 -08:00
parent f5a56c537f
commit 2bd47de3b9
5 changed files with 17 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
@@ -871,6 +872,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
}