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

fix tunneling

This commit is contained in:
2025-03-22 21:56:09 +01:00
parent 65ee312ad1
commit eaec01bad8
2 changed files with 16 additions and 1 deletions

View File

@@ -612,7 +612,15 @@ static void get_rds_group(RDSEncoder* enc, uint16_t *blocks, uint8_t stream) {
if(get_rds_custom_groups2(enc, blocks)) {
return;
}
return;
if(enc->encoder_data.rds2_mode == 0) { // tunneling
blocks[0] = enc->state->last_stream0_group[0];
blocks[1] = enc->state->last_stream0_group[1];
blocks[2] = enc->state->last_stream0_group[2];
blocks[3] = enc->state->last_stream0_group[3];
return;
} else {
// TODO: add store command
}
}
if(get_rds_custom_groups(enc, blocks)) {
@@ -745,6 +753,11 @@ group_coded:
if (IS_TYPE_B(blocks)) {
blocks[2] = enc->data[enc->program].pi;
}
enc->state[enc->program].last_stream0_group[0] = blocks[0];
enc->state[enc->program].last_stream0_group[1] = blocks[1];
enc->state[enc->program].last_stream0_group[2] = blocks[2];
enc->state[enc->program].last_stream0_group[3] = blocks[3];
}
void get_rds_bits(RDSEncoder* enc, uint8_t *bits, uint8_t stream) {

View File

@@ -200,6 +200,8 @@ typedef struct {
uint8_t eon_index : 3;
uint8_t eon_state : 4;
uint16_t last_stream0_group[GROUP_LENGTH];
} RDSState;
typedef struct {