Fixed regression on PTYN
This commit is contained in:
@@ -1372,6 +1372,7 @@ void TEF6686::readRDS(byte showrdserrors) {
|
|||||||
RDScharConverter(ptyn_buffer, PTYNtext, sizeof(PTYNtext) / sizeof(wchar_t), false); // Convert 8 bit ASCII to 16 bit ASCII
|
RDScharConverter(ptyn_buffer, PTYNtext, sizeof(PTYNtext) / sizeof(wchar_t), false); // Convert 8 bit ASCII to 16 bit ASCII
|
||||||
String utf8String = convertToUTF8(PTYNtext); // Convert RDS characterset to ASCII
|
String utf8String = convertToUTF8(PTYNtext); // Convert RDS characterset to ASCII
|
||||||
rds.PTYN = extractUTF8Substring(utf8String, 0, 8, false); // Make sure text is not longer than 8 chars
|
rds.PTYN = extractUTF8Substring(utf8String, 0, 8, false); // Make sure text is not longer than 8 chars
|
||||||
|
rds.hasPTYN = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
@@ -1761,6 +1762,7 @@ void TEF6686::clearRDS (bool fullsearchrds) {
|
|||||||
rds.hasCT = false;
|
rds.hasCT = false;
|
||||||
rds.hasTMC = false;
|
rds.hasTMC = false;
|
||||||
rds.hasAID = false;
|
rds.hasAID = false;
|
||||||
|
rds.hasPTYN = false;
|
||||||
rds.hasLongPS = false;
|
rds.hasLongPS = false;
|
||||||
rds.hasRDSplus = false;
|
rds.hasRDSplus = false;
|
||||||
rds.hasDABAF = false;
|
rds.hasDABAF = false;
|
||||||
|
|||||||
+2
-1
@@ -611,6 +611,7 @@ typedef struct _rds_ {
|
|||||||
bool hasTMC;
|
bool hasTMC;
|
||||||
bool hasAF;
|
bool hasAF;
|
||||||
bool hasCT;
|
bool hasCT;
|
||||||
|
bool hasPTYN;
|
||||||
bool rtAB;
|
bool rtAB;
|
||||||
bool rtAB32;
|
bool rtAB32;
|
||||||
bool hasRDSplus;
|
bool hasRDSplus;
|
||||||
@@ -707,7 +708,7 @@ class TEF6686 {
|
|||||||
void setUnMute();
|
void setUnMute();
|
||||||
void setVolume(int8_t volume);
|
void setVolume(int8_t volume);
|
||||||
void tone(uint16_t time, int16_t amplitude, uint16_t frequency);
|
void tone(uint16_t time, int16_t amplitude, uint16_t frequency);
|
||||||
String trimTrailingSpaces(String str);
|
String trimTrailingSpaces(String str);
|
||||||
uint8_t af_counter;
|
uint8_t af_counter;
|
||||||
uint8_t eon_counter;
|
uint8_t eon_counter;
|
||||||
uint8_t logbook_counter;
|
uint8_t logbook_counter;
|
||||||
|
|||||||
+2
-2
@@ -48,11 +48,11 @@ void ShowAdvancedRDS() {
|
|||||||
|
|
||||||
if (ptynold != radio.rds.PTYN || rdsreset) {
|
if (ptynold != radio.rds.PTYN || rdsreset) {
|
||||||
if (!screenmute) {
|
if (!screenmute) {
|
||||||
if (ptynold != "PTYN N/A") {
|
if (ptynold != "PTYN N/A" || radio.rds.hasPTYN) {
|
||||||
tftPrint(-1, "PTYN N/A", 216, 109, BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, "PTYN N/A", 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, ptynold, 216, 109, BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, ptynold, 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
if (radio.rds.PTYN.length() == 0) radio.rds.PTYN = "PTYN N/A";
|
if (!radio.rds.hasPTYN) radio.rds.PTYN = "PTYN N/A";
|
||||||
tftPrint(-1, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth, 16);
|
tftPrint(-1, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth, 16);
|
||||||
ptynold = radio.rds.PTYN;
|
ptynold = radio.rds.PTYN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user