Fixed 0x0d handling on LPS RDS parsing
This commit is contained in:
+3
-1
@@ -1518,8 +1518,10 @@ void TEF6686::readRDS(byte showrdserrors) {
|
|||||||
pslong_buffer[32] = '\0';
|
pslong_buffer[32] = '\0';
|
||||||
|
|
||||||
byte endmarker = 32;
|
byte endmarker = 32;
|
||||||
|
bool foundendmarker = false;
|
||||||
for (byte i = 0; i < 33; i++) {
|
for (byte i = 0; i < 33; i++) {
|
||||||
if (pslong_buffer[i] == 0x0d) {
|
if (pslong_buffer[i] == 0x0d) {
|
||||||
|
foundendmarker = true;
|
||||||
endmarker = i;
|
endmarker = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1541,7 +1543,7 @@ void TEF6686::readRDS(byte showrdserrors) {
|
|||||||
RDScharConverter(pslong_buffer, PSLongtext, sizeof(PSLongtext) / sizeof(wchar_t), true); // Convert 8 bit ASCII to 16 bit ASCII
|
RDScharConverter(pslong_buffer, PSLongtext, sizeof(PSLongtext) / sizeof(wchar_t), true); // Convert 8 bit ASCII to 16 bit ASCII
|
||||||
String utf8String = convertToUTF8(PSLongtext); // Convert RDS characterset to ASCII
|
String utf8String = convertToUTF8(PSLongtext); // Convert RDS characterset to ASCII
|
||||||
rds.stationNameLong = extractUTF8Substring(utf8String, 0, endmarker, true);
|
rds.stationNameLong = extractUTF8Substring(utf8String, 0, endmarker, true);
|
||||||
if (packet0long && packet1long && packet2long && packet3long) pslong_process = true; // OK, we had one runs, now let's go the idle PS Long writing
|
if ((packet0long && packet1long && packet2long && packet3long) || foundendmarker) pslong_process = true; // OK, we had one runs, now let's go the idle PS Long writing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user