Added AID information
In case AID (Open Data Application’s IDentification) is available a ticker in the AF/EON screen will show you the available AID's on the channel.
This commit is contained in:
+26
-7
@@ -548,7 +548,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
if (af[x].frequency == buffer0 && !af[x].regional) {
|
||||
af[x].regional = true;
|
||||
af_updatecounter++;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (buffer1 == currentfreq && buffer0 < buffer1) {
|
||||
@@ -556,7 +556,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
if (af[x].frequency == buffer0 && !af[x].mixed) {
|
||||
af[x].mixed = true;
|
||||
af_updatecounter++;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -566,7 +566,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
if (af[x].frequency == buffer1 && !af[x].regional) {
|
||||
af[x].regional = true;
|
||||
af_updatecounter++;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (buffer0 == currentfreq && buffer0 < buffer1) {
|
||||
@@ -574,7 +574,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
if (af[x].frequency == buffer0 && !af[x].mixed) {
|
||||
af[x].mixed = true;
|
||||
af_updatecounter++;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -617,17 +617,17 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
bool temp3 = af[j].afvalid;
|
||||
bool temp4 = af[j].checked;
|
||||
bool temp5 = af[j].regional;
|
||||
bool temp6 = af[j].mixed;
|
||||
bool temp6 = af[j].mixed;
|
||||
af[j].frequency = af[j + 1].frequency;
|
||||
af[j].afvalid = af[j + 1].afvalid;
|
||||
af[j].checked = af[j + 1].checked;
|
||||
af[j].regional = af[j + 1].regional;
|
||||
af[j].mixed = af[j + 1].mixed;
|
||||
af[j].mixed = af[j + 1].mixed;
|
||||
af[j + 1].frequency = temp;
|
||||
af[j + 1].afvalid = temp3;
|
||||
af[j + 1].checked = temp4;
|
||||
af[j + 1].regional = temp5;
|
||||
af[j + 1].mixed = temp6;
|
||||
af[j + 1].mixed = temp6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -751,6 +751,21 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
|
||||
case RDS_GROUP_3A: {
|
||||
if (!rdsDerrorThreshold) {
|
||||
if (rds.rdsD != 0) rds.hasAID = true;
|
||||
|
||||
bool isValuePresent = false;
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (rds.aid[i] == rds.rdsD) {
|
||||
isValuePresent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isValuePresent) {
|
||||
rds.aid[rds.aid_counter] = rds.rdsD;
|
||||
rds.aid_counter++;
|
||||
}
|
||||
|
||||
// RT+ init
|
||||
if (rds.rdsD == 0x4BD7) { // Check for RT+ application
|
||||
rds.hasRDSplus = true; // Set flag
|
||||
@@ -1006,6 +1021,8 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
||||
RDSplus2[i] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 10; i++) rds.aid[i] = 0;
|
||||
|
||||
rdsblock = 254;
|
||||
piold = 0;
|
||||
rds.correctPI = 0;
|
||||
@@ -1026,6 +1043,7 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
||||
rds.hasEON = false;
|
||||
rds.hasCT = false;
|
||||
rds.hasTMC = false;
|
||||
rds.hasAID = false;
|
||||
rds.hasRDSplus = false;
|
||||
rt_process = false;
|
||||
ps_process = false;
|
||||
@@ -1054,6 +1072,7 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
||||
packet1 = false;
|
||||
packet2 = false;
|
||||
packet3 = false;
|
||||
rds.aid_counter = 0;
|
||||
}
|
||||
|
||||
void TEF6686::tone(uint16_t time, int16_t amplitude, uint16_t frequency) {
|
||||
|
||||
Reference in New Issue
Block a user