diff --git a/src/TEF6686.cpp b/src/TEF6686.cpp index 0af34ed..b62bf78 100644 --- a/src/TEF6686.cpp +++ b/src/TEF6686.cpp @@ -540,6 +540,21 @@ void TEF6686::readRDS(byte showrdserrors) rds.stationID[3] = char(((stationID - 676 * int(stationID / 676)) % 26) + 65); } } + + bool faultyID = false; + + for (byte i = 0; i < 4; i++) { + if (!(rds.stationID[i] >= 'A' && rds.stationID[i] <= 'Z')) { + faultyID = true; + break; + } + } + + if (faultyID) { + for (byte i = 0; i < 9; i++) { + rds.stationID[i] = ' '; + } + } rds.stationID[7] = '?'; rds.stationID[8] = '\0'; }