mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
now?
This commit is contained in:
@@ -229,6 +229,7 @@ static void handle_rt1en(char *arg, RDSModulator* mod, char* output) {
|
||||
static void handle_dps1en(char *arg, RDSModulator* mod, char* output) {
|
||||
arg[1] = 0;
|
||||
mod->enc->data[mod->enc->program].dps1_enabled = arg[0];
|
||||
mod->enc->state[mod->enc->program].ps_update = 1;
|
||||
strcpy(output, "+\0");
|
||||
}
|
||||
|
||||
|
||||
12
src/rds.c
12
src/rds.c
@@ -195,9 +195,9 @@ static void get_rds_ps_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
// Copy Static PS
|
||||
memcpy(enc->state[enc->program].ps_text, enc->data[enc->program].ps, PS_LENGTH);
|
||||
|
||||
if(enc->state[enc->program].dynamic_ps_period == enc->data[enc->program].dps_label_period) {
|
||||
enc->state[enc->program].dynamic_ps_state = 0; // Static
|
||||
enc->state[enc->program].dynamic_ps_period = 0;
|
||||
if(enc->state[enc->program].static_ps_period == enc->data[enc->program].static_ps_period) {
|
||||
enc->state[enc->program].dynamic_ps_state = 1;
|
||||
enc->state[enc->program].static_ps_period = 0;
|
||||
}
|
||||
}
|
||||
if(enc->data[enc->program].dps1_enabled &&
|
||||
@@ -215,9 +215,9 @@ static void get_rds_ps_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
// TODO: Mode 2 and 3
|
||||
}
|
||||
if(enc->state[enc->program].dynamic_ps_position >= enc->data[enc->program].dps1_len) enc->state[enc->program].dynamic_ps_position = 0;
|
||||
if(enc->state[enc->program].static_ps_period == enc->data[enc->program].static_ps_period) {
|
||||
enc->state[enc->program].dynamic_ps_state = 1; // DPS1
|
||||
enc->state[enc->program].static_ps_period = 0;
|
||||
if(enc->state[enc->program].dynamic_ps_period == enc->data[enc->program].dynamic_ps_period) {
|
||||
enc->state[enc->program].dynamic_ps_state = 0; // Static
|
||||
enc->state[enc->program].dynamic_ps_period = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user