You've already forked TEF6686_ESP32
Fixed a bug in RDS error detection
This commit is contained in:
@@ -391,10 +391,10 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
if (rds.rdsB != rdsBprevious) {
|
if (rds.rdsB != rdsBprevious) {
|
||||||
rds.correct = false;
|
rds.correct = false;
|
||||||
|
|
||||||
if (((rds.rdsErr >> 14) & 0x02) > 0) rds.rdsAerror = true; else rds.rdsAerror = false; // Any errors in Block A?
|
rds.rdsAerror = (((rds.rdsErr >> 14) & 0x02) == 0x02);
|
||||||
if (((rds.rdsErr >> 12) & 0x02) > 0) rds.rdsBerror = true; else rds.rdsBerror = false; // Any errors in Block B?
|
rds.rdsBerror = (((rds.rdsErr >> 12) & 0x02) == 0x02);
|
||||||
if (((rds.rdsErr >> 10) & 0x02) > 0) rds.rdsCerror = true; else rds.rdsCerror = false; // Any errors in Block C?
|
rds.rdsCerror = (((rds.rdsErr >> 10) & 0x02) == 0x02);
|
||||||
if (((rds.rdsErr >> 8) & 0x02) > 0) rds.rdsDerror = true; else rds.rdsDerror = false; // Any errors in Block D?
|
rds.rdsDerror = (((rds.rdsErr >> 8) & 0x02) == 0x02);
|
||||||
if (!rds.rdsAerror && !rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror) rds.correct = true; // Any errors in all blocks?
|
if (!rds.rdsAerror && !rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror) rds.correct = true; // Any errors in all blocks?
|
||||||
if ((rdsStat & (1 << 15))) rdsReady = true;
|
if ((rdsStat & (1 << 15))) rdsReady = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user