0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 04:43:52 +01:00

add some ascii cmd rules

This commit is contained in:
2025-03-16 14:14:29 +01:00
parent c839571d3a
commit 17c5c9023c
2 changed files with 6 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ void poll_control_pipe(RDSModulator* mod) {
if (bytes_read <= 0) return;
token = strtok((char *)pipe_buf, "\n");
if(token == NULL) token = strtok((char *)pipe_buf, "\x1A");
while (token != NULL) {
size_t cmd_len = strlen(token);
if (cmd_len > 0 && cmd_len < CMD_BUFFER_SIZE) {
@@ -39,6 +40,7 @@ void poll_control_pipe(RDSModulator* mod) {
process_ascii_cmd(mod, cmd_buf);
}
token = strtok(NULL, "\n");
if(token == NULL) token = strtok(NULL, "\x1A");
}
}