Bot: DM+channel modes with separate replies; buzzer auto-mute; UX fixes

- Bot redesign: DM bot active for all private messages (no pubkey filter),
  channel bot optional with separate enable flag; both can run simultaneously
- Bot: one shared trigger, separate reply texts for DM and channel
- Buzzer: add Auto mode (mutes when BT connected, unmutes on disconnect);
  per-channel force-on overrides still work as intended
- Settings: defer flash writes to menu exit (only when dirty)
- Settings: add Seconds toggle (hide clock seconds, refresh drops 1s→60s)
- Fullscreen msg preview: fix truncation (fmsg buf 79→140 chars)
- RingtoneEditor: fix melody playback cut after first note (RTTTL lib holds
  pointer — moved play buffer to member variable)
- BotScreen: remove key hint footer
- .gitattributes: protect README.md from upstream merge conflicts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-12 20:12:54 +02:00
co-authored by Claude Sonnet 4.6
parent 2fcf296b43
commit 5270b8450a
9 changed files with 154 additions and 139 deletions
+8 -6
View File
@@ -49,10 +49,12 @@ struct NodePrefs { // persisted to file
uint8_t ringtone_len; // number of notes in custom ringtone (0 = use default)
uint8_t ringtone_notes[32]; // packed: bits0-2=pitch, bits3-4=octave-4, bits5-6=dur_idx
uint16_t home_pages_mask; // bitmask of visible home pages (bit0=Clock..bit8=Shutdown); 0=all visible
uint8_t bot_enabled; // 0=disabled, 1=enabled
uint8_t bot_channel_idx; // channel index to monitor (when bot_target_type==0)
char bot_trigger[64]; // trigger phrase (case-insensitive contains match)
char bot_reply[140]; // auto-reply text
uint8_t bot_target_type; // 0=channel (default), 1=DM contact
uint8_t bot_dm_pubkey[4]; // pubkey prefix of DM target; all-zero = any DM sender
uint8_t bot_enabled; // 0=disabled, 1=DM bot active (responds to all DMs)
uint8_t bot_channel_enabled; // 0=disabled, 1=channel bot active for bot_channel_idx
uint8_t bot_channel_idx; // channel index for channel bot
char bot_trigger[64]; // trigger phrase (case-insensitive contains match)
char bot_reply_dm[140]; // auto-reply text for DM
char bot_reply_ch[140]; // auto-reply text for channel
uint8_t clock_hide_seconds; // 0=show HH:MM:SS/refresh 1s (default), 1=hide/refresh 60s
uint8_t buzzer_auto; // 0=manual (default), 1=auto-mute when BT connected
};