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:
@@ -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) {
|
static void handle_lps(char *arg, RDSModulator* mod, char* output) {
|
||||||
arg[LPS_LENGTH * 2] = 0;
|
arg[LPS_LENGTH * 2] = 0;
|
||||||
set_rds_lps(mod->enc, arg);
|
set_rds_lps(mod->enc, arg);
|
||||||
@@ -495,6 +505,7 @@ static const command_handler_t commands_eq5[] = {
|
|||||||
{"DPTY", handle_dpty, 4},
|
{"DPTY", handle_dpty, 4},
|
||||||
{"SLCD", handle_slcd, 4},
|
{"SLCD", handle_slcd, 4},
|
||||||
{"ERTP", handle_ertp, 4},
|
{"ERTP", handle_ertp, 4},
|
||||||
|
{"LINK", handle_link, 4},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const command_handler_t commands_eq2[] = {
|
static const command_handler_t commands_eq2[] = {
|
||||||
|
|||||||
@@ -365,12 +365,14 @@ static void get_rds_lps_group(RDSEncoder* enc, RDSGroup *group) {
|
|||||||
|
|
||||||
static void get_rds_ecc_group(RDSEncoder* enc, RDSGroup *group) {
|
static void get_rds_ecc_group(RDSEncoder* enc, RDSGroup *group) {
|
||||||
group->b |= 1 << 12;
|
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) {
|
static void get_rds_slcdata_group(RDSEncoder* enc, RDSGroup *group) {
|
||||||
group->b |= 1 << 12;
|
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;
|
group->c |= enc->data[enc->program].slc_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user