mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-11 16:12:01 +00:00
feat(companion): quiet hours -- muted on a schedule, the alarm still rings
Settings > Sound > Quiet hours (L2: its own group; L1: Quiet hrs / from / until): from quiet_from to quiet_to (local hours, wrapping past midnight) the buzzer is muted and a message doesn't wake the screen; the clock alarm still rings. A manual mute or unmute inside the window stands until the window ends. Off with the clock unset. NodePrefs gains quiet_hours / quiet_from / quiet_to (appended to the file, sentinel 0xC0DE0030; sizeof 2832 on nRF52 and ESP32), off by default, 22:00-07:00. hourInWindow() / localHour() are shared with the bot's quiet hours. soundctl::tick() replaces autoTick() (Auto and quiet hours). Also fixes the L2 side-button mute: it went by the mode, not by whether the buzzer was muted, so with Auto + an app connected (and now quiet hours) the first press muted instead of unmuting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1846,6 +1846,8 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe
|
||||
_prefs.radio_fem_txgain = 0;
|
||||
_prefs.display_brightness = 2; // medium brightness by default
|
||||
_prefs.buzzer_volume = 4; // max volume by default
|
||||
_prefs.quiet_from = 22; // quiet hours (off by default) 22:00-07:00
|
||||
_prefs.quiet_to = 7;
|
||||
_prefs.ringtone_bpm_idx = 2; // 120 bpm default
|
||||
_prefs.ringtone_len = 0; // no custom ringtone by default
|
||||
_prefs.ringtone2_bpm_idx = 2; // 120 bpm default
|
||||
|
||||
Reference in New Issue
Block a user