mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-07-31 17:29:17 +02:00
damn it
This commit is contained in:
@@ -210,9 +210,6 @@ static void get_rds_ps_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
}
|
||||
} else {
|
||||
if(enc->data[enc->program].dps1_len > PS_LENGTH) {
|
||||
uint8_t scroll_threshold = enc->data[enc->program].dps_speed ? 4 : 6;
|
||||
|
||||
if (enc->state[enc->program].dynamic_ps_period >= scroll_threshold) {
|
||||
switch(enc->data[enc->program].dps1_mode) {
|
||||
case 0:
|
||||
memcpy(enc->state[enc->program].ps_text, &(enc->state[enc->program].dps1_text[enc->state[enc->program].dynamic_ps_position]), PS_LENGTH);
|
||||
@@ -224,8 +221,6 @@ static void get_rds_ps_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
break;
|
||||
}
|
||||
|
||||
enc->state[enc->program].dynamic_ps_period = 0;
|
||||
|
||||
if(enc->state[enc->program].dynamic_ps_position >= enc->data[enc->program].dps1_len) {
|
||||
enc->state[enc->program].dynamic_ps_position = 0;
|
||||
enc->state[enc->program].dps1_repeat_count++;
|
||||
@@ -236,7 +231,6 @@ static void get_rds_ps_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
enc->state[enc->program].dps1_repeat_count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
memcpy(enc->state[enc->program].ps_text, enc->state[enc->program].dps1_text, PS_LENGTH);
|
||||
enc->state[enc->program].dynamic_ps_period++;
|
||||
@@ -262,15 +256,10 @@ static void get_rds_ps_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
}
|
||||
|
||||
enc->state[enc->program].ps_csegment++;
|
||||
if (enc->state[enc->program].ps_csegment >= 4) {
|
||||
enc->state[enc->program].ps_csegment = 0;
|
||||
// Increment the dynamic PS period counter when we've completed a full PS transmission
|
||||
if (enc->state[enc->program].dynamic_ps_state == 1) {
|
||||
enc->state[enc->program].dynamic_ps_period++;
|
||||
}
|
||||
}
|
||||
if (enc->state[enc->program].ps_csegment >= 4) enc->state[enc->program].ps_csegment = 0;
|
||||
}
|
||||
|
||||
|
||||
static uint8_t get_rds_rt_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
if (enc->state[enc->program].rt_update) {
|
||||
memcpy(enc->state[enc->program].rt_text, enc->data[enc->program].rt1, RT_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user