diff --git a/examples/companion_radio/DataStore.cpp b/examples/companion_radio/DataStore.cpp index e3e8657c..d9e0d10c 100644 --- a/examples/companion_radio/DataStore.cpp +++ b/examples/companion_radio/DataStore.cpp @@ -283,6 +283,9 @@ void DataStore::loadPrefsInt(const char *filename, NodePrefs& _prefs, double& no file.read((uint8_t *)&_prefs.ch_notif_melody_2, sizeof(_prefs.ch_notif_melody_2)); if (file.available()) { file.read((uint8_t *)_prefs.dm_melody, sizeof(_prefs.dm_melody)); + if (file.available()) { + file.read((uint8_t *)&_prefs.auto_lock, sizeof(_prefs.auto_lock)); + } } } } @@ -371,6 +374,7 @@ void DataStore::savePrefs(const NodePrefs& _prefs, double node_lat, double node_ file.write((uint8_t *)&_prefs.ch_notif_melody_set, sizeof(_prefs.ch_notif_melody_set)); file.write((uint8_t *)&_prefs.ch_notif_melody_2, sizeof(_prefs.ch_notif_melody_2)); file.write((uint8_t *)_prefs.dm_melody, sizeof(_prefs.dm_melody)); + file.write((uint8_t *)&_prefs.auto_lock, sizeof(_prefs.auto_lock)); file.close(); } diff --git a/examples/companion_radio/MyMeshBot.h b/examples/companion_radio/MyMeshBot.h index 5c892164..d75af84e 100644 --- a/examples/companion_radio/MyMeshBot.h +++ b/examples/companion_radio/MyMeshBot.h @@ -35,7 +35,7 @@ void MyMesh::tryBotReplyDM(const ContactInfo& from, const char* text) { } void MyMesh::tryBotReplyChannel(uint8_t channel_idx, const char* text) { - if (!(_prefs.bot_channel_enabled && _prefs.bot_trigger[0] && _prefs.bot_reply_ch[0] && + if (!(_prefs.bot_enabled && _prefs.bot_channel_enabled && _prefs.bot_trigger[0] && _prefs.bot_reply_ch[0] && channel_idx == _prefs.bot_channel_idx && millis() - _bot_last_ch_reply_ms > 10000UL)) return; diff --git a/examples/companion_radio/ui-new/QuickMsgScreen.h b/examples/companion_radio/ui-new/QuickMsgScreen.h index a5b4b2ba..e2230605 100644 --- a/examples/companion_radio/ui-new/QuickMsgScreen.h +++ b/examples/companion_radio/ui-new/QuickMsgScreen.h @@ -1059,7 +1059,7 @@ public: NodePrefs* p = _task->getNodePrefs(); int slot = _active_msgs[_msg_sel - 1]; const char* tmpl = p ? p->custom_msgs[slot] : "OK"; - char msg[80]; + char msg[140]; expandMsg(tmpl, msg, sizeof(msg)); bool ok = sendText(msg); afterSend(ok, msg); diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index db4222d4..8b05997b 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -117,7 +117,6 @@ static const uint16_t HP_ALL = 0x01FF; #include "KeyboardWidget.h" #include "FullscreenMsgView.h" #include "SensorPlaceholders.h" -// placeholder to find end of conflict #include "SettingsScreen.h" #include "QuickMsgScreen.h" diff --git a/src/helpers/ui/DisplayDriver.h b/src/helpers/ui/DisplayDriver.h index 86dcdfc9..9b4a8014 100644 --- a/src/helpers/ui/DisplayDriver.h +++ b/src/helpers/ui/DisplayDriver.h @@ -56,11 +56,59 @@ public: case 0x015B: return 's'; case 0x015A: return 'S'; // ś Ś case 0x017A: return 'z'; case 0x0179: return 'Z'; // ź Ź case 0x017C: return 'z'; case 0x017B: return 'Z'; // ż Ż + // Czech/Slovak + case 0x010D: return 'c'; case 0x010C: return 'C'; // č Č + case 0x0161: return 's'; case 0x0160: return 'S'; // š Š + case 0x017E: return 'z'; case 0x017D: return 'Z'; // ž Ž + case 0x0159: return 'r'; case 0x0158: return 'R'; // ř Ř + case 0x011B: return 'e'; case 0x011A: return 'E'; // ě Ě + case 0x016F: return 'u'; case 0x016E: return 'U'; // ů Ů + case 0x010F: return 'd'; case 0x010E: return 'D'; // ď Ď + case 0x0165: return 't'; case 0x0164: return 'T'; // ť Ť + case 0x0148: return 'n'; case 0x0147: return 'N'; // ň Ň + case 0x013E: return 'l'; case 0x013D: return 'L'; // ľ Ľ + case 0x013A: return 'l'; case 0x0139: return 'L'; // ĺ Ĺ + case 0x0155: return 'r'; case 0x0154: return 'R'; // ŕ Ŕ // German case 0x00E4: return 'a'; case 0x00C4: return 'A'; // ä Ä case 0x00F6: return 'o'; case 0x00D6: return 'O'; // ö Ö case 0x00FC: return 'u'; case 0x00DC: return 'U'; // ü Ü case 0x00DF: return 's'; // ß + // Scandinavian + case 0x00E5: return 'a'; case 0x00C5: return 'A'; // å Å + case 0x00F8: return 'o'; case 0x00D8: return 'O'; // ø Ø + case 0x00E6: return 'a'; case 0x00C6: return 'A'; // æ Æ + // Hungarian + case 0x0151: return 'o'; case 0x0150: return 'O'; // ő Ő + case 0x0171: return 'u'; case 0x0170: return 'U'; // ű Ű + // Romanian + case 0x0103: return 'a'; case 0x0102: return 'A'; // ă Ă + case 0x0219: return 's'; case 0x0218: return 'S'; // ș Ș + case 0x021B: return 't'; case 0x021A: return 'T'; // ț Ț + // Croatian + case 0x0111: return 'd'; case 0x0110: return 'D'; // đ Đ + // Icelandic + case 0x00F0: return 'd'; case 0x00D0: return 'D'; // ð Ð (eth) + case 0x00FE: return 't'; case 0x00DE: return 'T'; // þ Þ (thorn) + // Romanian cedilla variants (legacy encoding) + case 0x0163: return 't'; case 0x0162: return 'T'; // ţ Ţ + // Turkish + case 0x011F: return 'g'; case 0x011E: return 'G'; // ğ Ğ + case 0x015F: return 's'; case 0x015E: return 'S'; // ş Ş + case 0x0131: return 'i'; // ı + // Baltic (Lithuanian/Latvian) + case 0x0101: return 'a'; case 0x0100: return 'A'; // ā Ā + case 0x0113: return 'e'; case 0x0112: return 'E'; // ē Ē + case 0x012B: return 'i'; case 0x012A: return 'I'; // ī Ī + case 0x016B: return 'u'; case 0x016A: return 'U'; // ū Ū + case 0x0123: return 'g'; case 0x0122: return 'G'; // ģ Ģ + case 0x0137: return 'k'; case 0x0136: return 'K'; // ķ Ķ + case 0x013C: return 'l'; case 0x013B: return 'L'; // ļ Ļ + case 0x0146: return 'n'; case 0x0145: return 'N'; // ņ Ņ + case 0x0157: return 'r'; case 0x0156: return 'R'; // ŗ Ŗ + case 0x0173: return 'u'; case 0x0172: return 'U'; // ų Ų + case 0x0117: return 'e'; case 0x0116: return 'E'; // ė Ė + case 0x012F: return 'i'; case 0x012E: return 'I'; // į Į // French/Spanish/Portuguese common accents case 0x00E0: case 0x00E1: case 0x00E2: case 0x00E3: return 'a'; case 0x00C0: case 0x00C1: case 0x00C2: case 0x00C3: return 'A';