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

some refactoring

This commit is contained in:
2025-03-15 10:31:50 +01:00
parent 292956abf1
commit b6546dd281
7 changed files with 125 additions and 92 deletions

View File

@@ -24,7 +24,7 @@ int open_control_pipe(char *filename) {
* Polls the control file (pipe), and if a command is received,
* calls process_ascii_cmd.
*/
void poll_control_pipe(RDSModulator* enc) {
void poll_control_pipe(RDSModulator* mod) {
static unsigned char pipe_buf[CTL_BUFFER_SIZE];
static unsigned char cmd_buf[CMD_BUFFER_SIZE];
int bytes_read;
@@ -47,7 +47,7 @@ void poll_control_pipe(RDSModulator* enc) {
if (cmd_len > 0 && cmd_len < CMD_BUFFER_SIZE) {
memset(cmd_buf, 0, CMD_BUFFER_SIZE);
strncpy((char *)cmd_buf, token, CMD_BUFFER_SIZE - 1);
process_ascii_cmd(enc, cmd_buf);
process_ascii_cmd(mod, cmd_buf);
}
token = strtok(NULL, "\n");
}