fix pocsag tx char limit (#2303)

* fix pocsag tx display

* set max to 40, and add 2nd line

* up to 80 chars

* max pocsag to 80 via serial too

* fix amp override
This commit is contained in:
Totoo 2024-10-15 20:38:18 +02:00 committed by GitHub
parent 8d1fb7cb66
commit 1b3359b050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 25 additions and 11 deletions

View file

@ -1079,8 +1079,8 @@ static void cmd_sendpocsag(BaseSequentialStream* chp, int argc, char* argv[]) {
}
uint64_t addr = atol(argv[0]);
int msglen = atoi(argv[1]); // without minimum limit, since addr only don't send anything
if (msglen > 30 || msglen < 0) {
chprintf(chp, "error, msglen max is 30\r\n");
if (msglen > 80 || msglen < 0) {
chprintf(chp, "error, msglen max is 80\r\n");
return;
}
@ -1120,7 +1120,7 @@ static void cmd_sendpocsag(BaseSequentialStream* chp, int argc, char* argv[]) {
}
}
uint8_t msg[31] = {0};
uint8_t msg[81] = {0};
if (msglen > 0) {
chprintf(chp, "send %d bytes\r\n", msglen);
do {