You've already forked TEF6686_ESP32
Improvement AF method B detector
This commit is contained in:
@@ -629,6 +629,18 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
}
|
||||
|
||||
if (afinit) {
|
||||
/* Debug info
|
||||
if ((rds.rdsC >> 8) > 224 && (rds.rdsC >> 8) < 250) {
|
||||
Serial.print("#");
|
||||
Serial.print((rds.rdsC >> 8) - 224);
|
||||
Serial.print("\t");
|
||||
Serial.println((rds.rdsC & 0xFF) * 10 + 8750);
|
||||
} else {
|
||||
Serial.print((rds.rdsC >> 8) * 10 + 8750);
|
||||
Serial.print("\t");
|
||||
Serial.println((rds.rdsC & 0xFF) * 10 + 8750);
|
||||
}
|
||||
*/
|
||||
if ((rds.rdsC >> 8) > 224 && (rds.rdsC >> 8) < 250 && ((rds.rdsC & 0xFF) * 10 + 8750) == currentfreq && rds.hasAF) {
|
||||
if (afmethodBtrigger) afmethodB = true; // Check for AF method B
|
||||
afmethodBprobe = true;
|
||||
@@ -660,7 +672,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
if ((rds.rdsC & 0xFF) > 0 && (rds.rdsC & 0xFF) < 205) buffer1 = (rds.rdsC & 0xFF) * 10 + 8750; else buffer1 = 0;
|
||||
|
||||
if (((rds.rdsC >> 8) > 0 && (rds.rdsC >> 8) < 205) && (buffer0 == doubletestfreq || buffer1 == doubletestfreq)) doublecounter++;
|
||||
if (doublecounter > (af_number / 2 - 2)) afmethodB = true; // If signed frequency also appears more than once in the AF list, AF Method B detected
|
||||
if (doublecounter > (af_number / 2)) afmethodB = true; // If signed frequency also appears more than once in the AF list, AF Method B detected
|
||||
|
||||
if (afmethodBprobe && af_counterbcheck > af_counterb) afmethodBprobe = false; // If more than counter received disable probe flag
|
||||
|
||||
|
||||
Reference in New Issue
Block a user