feat: melody assignment per channel/DM, dual ringtone slots, volume cleanup

Add second ringtone slot (ringtone2_*) to NodePrefs and DataStore.
Add per-channel and per-DM melody assignment (built-in / melody 1 / 2)
stored in NodePrefs bitmasks and DmMelodyEntry table.
Settings screen exposes DM/CH sound items; RingtoneEditorScreen supports
switching between slots. notify() uses buildMelodyFromPrefs() to select
the correct RTTTL string per contact.

Remove broken nRF52 volume control from buzzer.cpp: tone() uses
NRF_PWM2 with DECODER.MODE=Auto so TASKS_NEXTSTEP has no effect and
duty cannot be changed before the first DMA read without patching the
Arduino core. applyVolume() is now a no-op on nRF52.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-15 11:43:38 +02:00
co-authored by Claude Sonnet 4.6
parent 39731bb7fa
commit b3c6416874
6 changed files with 234 additions and 26 deletions
+2 -1
View File
@@ -34,6 +34,7 @@ class UITask : public AbstractUITask {
unsigned long _next_refresh, _auto_off;
NodePrefs* _node_prefs;
char _alert[80];
char _notif_mel_buf[220]; // persistent RTTTL buffer for custom notification melodies
unsigned long _alert_expiry;
int _msgcount;
int _room_unread;
@@ -99,7 +100,7 @@ public:
void gotoSettingsScreen();
void gotoQuickMsgScreen();
void gotoToolsScreen();
void gotoRingtoneEditor();
void gotoRingtoneEditor(int slot = 0);
void gotoBotScreen();
void gotoNearbyScreen();
void gotoDashboardConfig();