From 25a8c4124c508b3627ee7b9efecc28c0300aafab Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Wed, 26 Feb 2025 10:53:41 +0100 Subject: [PATCH] Update to improve callsign decoding when no database is used --- src/TEF6686.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TEF6686.cpp b/src/TEF6686.cpp index 6ed6721..3d1672c 100644 --- a/src/TEF6686.cpp +++ b/src/TEF6686.cpp @@ -442,15 +442,15 @@ void TEF6686::readRDS(byte showrdserrors) { } } - if (!rdsAerrorThreshold && !rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold) { + if (!rdsAerrorThreshold) { rds.picode[4] = ' '; rds.picode[5] = ' '; errorfreepi = true; } if (!errorfreepi) { - if (((rds.rdsErr >> 14) & 0x03) > 2) rds.picode[5] = '?'; else rds.picode[5] = ' '; - if (((rds.rdsErr >> 14) & 0x03) > 1) rds.picode[4] = '?'; else rds.picode[4] = ' '; // Not sure, add a ? + if (((rds.rdsErr >> 14) & 0x03) > 1) rds.picode[5] = '?'; else rds.picode[5] = ' '; + if (((rds.rdsErr >> 14) & 0x03) > 0) rds.picode[4] = '?'; else rds.picode[4] = ' '; // Not sure, add a ? } else { rds.picode[4] = ' '; rds.picode[5] = ' '; @@ -479,7 +479,7 @@ void TEF6686::readRDS(byte showrdserrors) { } // USA Station callsign decoder - if (ps_process && rds.correctPI != 0 && rds.region > 0 && correctPIold != rds.correctPI) { + if ((rds.region == 1 ? ps_process : true) && rds.correctPI != 0 && rds.region > 0 && correctPIold != rds.correctPI) { bool foundMatch = false; fs::File file;