mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-10-23 09:42:23 +00:00
v1.6.2: Fix announce bin8 encoding in Settings, deduplicate encodeAnnounceName
PlatformIO Build / build (push) Failing after 30s
PlatformIO Build / release (push) Has been skipped
PlatformIO Build / build (push) Failing after 30s
PlatformIO Build / release (push) Has been skipped
Apply bin8 fix to the duplicate announce encoding in LvSettingsScreen (Send Announce action). Replace inline copy with shared function from main.cpp. Follows up on PR #5.
This commit is contained in:
1 parent
e3dffe6df2
commit
d89b6699ab
3 files changed
+9
-11
No files matched your search
@@ -450,14 +450,7 @@ void LvSettingsScreen::buildItems() {
|
||||
announceItem.formatter = [](int) { return String("[Enter]"); };
|
||||
announceItem.action = [this]() {
|
||||
if (_rns && _cfg) {
|
||||
const String& name = _cfg->settings().displayName;
|
||||
RNS::Bytes appData;
|
||||
if (!name.isEmpty()) {
|
||||
size_t len = name.length(); if (len > 31) len = 31;
|
||||
uint8_t buf[2 + 31]; buf[0] = 0x91; buf[1] = 0xA0 | (uint8_t)len;
|
||||
memcpy(buf + 2, name.c_str(), len);
|
||||
appData = RNS::Bytes(buf, 2 + len);
|
||||
}
|
||||
RNS::Bytes appData = encodeAnnounceName(_cfg->settings().displayName);
|
||||
_rns->announce(appData);
|
||||
if (_ui) { _ui->lvStatusBar().flashAnnounce(); _ui->lvStatusBar().showToast("Announce sent!"); }
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user