externalize basebands, not needed, and remove too high level function (#3134)

* externalize basebands, not needed, and remove too high level function

* fix ert
This commit is contained in:
Totoo
2026-04-10 21:08:46 +02:00
committed by GitHub
parent 4dce613172
commit 900c80549f
5 changed files with 36 additions and 18 deletions
+13 -1
View File
@@ -96,7 +96,19 @@ bool POCSAGTXView::start_tx() {
if (type == MessageType::NUMERIC_ONLY) {
// Check for invalid characters
if (message.find_first_not_of("0123456789SU -][") != std::string::npos) {
const char* p = message.c_str();
bool is_valid = true;
while (*p != '\0') {
const char c = *p;
// Check if char is NOT in the allowed set
if (!((c >= '0' && c <= '9') || c == 'S' || c == 'U' ||
c == ' ' || c == '-' || c == '[' || c == ']')) {
is_valid = false;
break;
}
p++;
}
if (!is_valid) {
nav_.display_modal("Bad message", "A numeric only message must\nonly contain:\n0123456789SU][- or space.");
return false;
}