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

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

View File

@@ -278,7 +278,13 @@ static void handle_ptynen(char *arg, RDSModulator* mod, char* output) {
}
static void handle_rtprun(char *arg, RDSModulator* mod, char* output) {
set_rds_rtplus_flags(mod->enc, atoi(arg));
int flag1, flag2;
if (sscanf(arg, "%d,%d", &flag1, &flag2) == 2) {
set_rds_rtplus_flags(mod->enc, flag1);
if(flag2) mod->enc->rtpState[mod->enc->program].toggle ^= 1;
} else {
set_rds_rtplus_flags(mod->enc, atoi(arg));
}
strcpy(output, "+\0");
}