0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 04:43:52 +01:00

add rds2 custom cmd

This commit is contained in:
2025-03-22 21:25:31 +01:00
parent 52af1955e0
commit 103e52e8f4
3 changed files with 27 additions and 2 deletions

View File

@@ -545,10 +545,27 @@ static uint8_t get_rds_custom_groups(RDSEncoder* enc, uint16_t *blocks) {
}
return 0;
}
static uint8_t get_rds_custom_groups2(RDSEncoder* enc, uint16_t *blocks) {
if(enc->state[enc->program].custom_group2[0] == 1) {
enc->state[enc->program].custom_group2[0] = 0;
blocks[0] = enc->state[enc->program].custom_group[1];
blocks[1] = enc->state[enc->program].custom_group[2];
blocks[2] = enc->state[enc->program].custom_group[3];
blocks[3] = enc->state[enc->program].custom_group[4];
return 1;
}
return 0;
}
static void get_rds_group(RDSEncoder* enc, uint16_t *blocks, uint8_t stream) {
blocks[0] = enc->data[enc->program].pi;
if(stream != 0) blocks[0] = 0;
if(stream != 0) {
blocks[0] = 0;
if(get_rds_custom_groups2(enc, blocks)) {
goto group_coded;
}
return;
}
blocks[1] = 0;
blocks[2] = 0;
blocks[3] = 0;