0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

add option to set the link bit in the 1A group

This commit is contained in:
2025-04-13 18:48:26 +02:00
parent a6cba08503
commit f57aa80a5e
3 changed files with 17 additions and 2 deletions

View File

@@ -72,6 +72,16 @@ static void handle_ertp(char *arg, RDSModulator* mod, char* output) {
}
}
static void handle_linkage(char *arg, RDSModulator* mod, char* output) {
if(arg[0] == '\0') {
mod->enc->data[mod->enc->program].eon_linkage = 0;
return;
}
mod->enc->data[mod->enc->program].eon_linkage = atoi(arg);
strcpy(output, "+\0");
}
static void handle_lps(char *arg, RDSModulator* mod, char* output) {
arg[LPS_LENGTH * 2] = 0;
set_rds_lps(mod->enc, arg);
@@ -495,6 +505,7 @@ static const command_handler_t commands_eq5[] = {
{"DPTY", handle_dpty, 4},
{"SLCD", handle_slcd, 4},
{"ERTP", handle_ertp, 4},
{"LINK", handle_link, 4},
};
static const command_handler_t commands_eq2[] = {

View File

@@ -365,12 +365,14 @@ static void get_rds_lps_group(RDSEncoder* enc, RDSGroup *group) {
static void get_rds_ecc_group(RDSEncoder* enc, RDSGroup *group) {
group->b |= 1 << 12;
group->c = enc->data[enc->program].ecc;
group->c = enc->state[enc->program].eon_linkage << 15;
group->c |= enc->data[enc->program].ecc;
}
static void get_rds_slcdata_group(RDSEncoder* enc, RDSGroup *group) {
group->b |= 1 << 12;
group->c = 0x6000;
group->c = enc->state[enc->program].eon_linkage << 15;
group->c |= 0x6000;
group->c |= enc->data[enc->program].slc_data;
}

View File

@@ -166,6 +166,8 @@ typedef struct {
uint8_t af_state : 6;
uint8_t af_oda_state : 6;
uint8_t eon_linkage : 1;
uint16_t last_stream0_group[3];
} RDSState;