POCSAG: Allow all 128 ASCII characters to be transmitted

To allow all 128 ASCII characters, a null-terminated string cannot be
used. Instead a length is used to define string length, to allow
null-character in that the message string.

The print function in frame.c is improved and used to present the
string.
This commit is contained in:
Andreas Eversberg
2024-04-21 18:49:35 +02:00
parent b16b26d326
commit f391c0d947
5 changed files with 96 additions and 61 deletions

View File

@@ -224,10 +224,9 @@ static void myhandler(void)
}
/* send msg */
if (i < pos) {
buffer[i] = '\0';
pos = 0;
if (tx)
pocsag_msg_send(language, buffer);
pocsag_msg_send(language, buffer, i);
else
LOGP(DPOCSAG, LOGL_ERROR, "Failed to send message, transmitter is not enabled!\n");
}