Enhance RDS handling by adding RTP state toggling and improving command parsing

This commit is contained in:
2025-03-22 19:10:26 +01:00
parent 40898eaca3
commit 07b0a3c91c
5 changed files with 33 additions and 12 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ void poll_control_pipe(RDSModulator* mod) {
if (bytes_read <= 0) return;
token = strtok((char *)pipe_buf, "\r\n");
if(token == NULL) token = strtok((char *)pipe_buf, "\x1A");
if(token == NULL) token = strtok((char *)pipe_buf, "\r");
while (token != NULL) {
size_t cmd_len = strlen(token);
if (cmd_len > 0 && cmd_len < CMD_BUFFER_SIZE) {
@@ -40,7 +40,7 @@ void poll_control_pipe(RDSModulator* mod) {
process_ascii_cmd(mod, cmd_buf);
}
token = strtok(NULL, "\r\n");
if(token == NULL) token = strtok(NULL, "\x1A");
if(token == NULL) token = strtok(NULL, "\r");
}
}