mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-09 11:16:39 +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:
@@ -52,12 +52,17 @@ for a second radio). They are L2-specific and block the loop for ~90 s.
|
||||
|
||||
## D. Quiet hours in the core
|
||||
|
||||
- [ ] A start and end time when the device is silent; in ui-core, so L1, L2
|
||||
- [x] A start and end time when the device is silent; in ui-core, so L1, L2
|
||||
and other boards get it. New NodePrefs fields go at the end of the
|
||||
stored layout, so an L1 keeps its settings after the update.
|
||||
To decide: the Clock alarm rings anyway (proposed yes); whether a
|
||||
message wakes the screen during quiet hours; with the clock not set,
|
||||
quiet hours are off (proposed).
|
||||
Done 2026-09-28: NodePrefs quiet_hours / quiet_from / quiet_to
|
||||
(sentinel 0x30, sizeof 2832), off by default, 22-7; the alarm rings, a
|
||||
message doesn't wake the screen, a manual mute / unmute stands until
|
||||
the window ends. hourInWindow() / localHour() shared with the bot's
|
||||
quiet hours. L2 tested; L1 built, not flashed yet.
|
||||
|
||||
## E. OTA end-to-end test
|
||||
|
||||
@@ -107,5 +112,4 @@ it; implement the tiers, docs and website after the merge.
|
||||
|
||||
## Open decisions
|
||||
|
||||
- D: alarm during quiet hours; messages waking the screen.
|
||||
- I: tier spec before stage F, or after the merge.
|
||||
|
||||
Reference in New Issue
Block a user