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

refactor RDS handling: remove unused functions and improve command parsing

This commit is contained in:
2025-03-13 21:30:21 +01:00
parent 3d35f7237f
commit 737e298fa0
3 changed files with 15 additions and 20 deletions

View File

@@ -105,7 +105,7 @@ static void get_rds_ps_group(uint16_t *blocks) {
blocks[1] |= ((rds_data.di >> (3 - ps_csegment)) & INT8_0) << 2;
blocks[1] |= ps_csegment;
blocks[2] = get_next_af();
if(rds_data.ta && rds_data.traffic_ps_on) {
if(rds_data.ta && tps_text[0]) {
blocks[3] = tps_text[ps_csegment * 2] << 8 | tps_text[ps_csegment * 2 + 1];
} else {
/* TODO: Add DPS */
@@ -500,9 +500,6 @@ void set_rds_ps(unsigned char *ps) {
while (*ps != 0 && len < PS_LENGTH)
rds_data.ps[len++] = *ps++;
}
void set_rds_tpson(uint8_t tpson) {
rds_data.traffic_ps_on = tpson & INT8_0;
}
void set_rds_tps(unsigned char *tps) {
uint8_t len = 0;