You've already forked TEF6686_ESP32
Fix flashing PI in USA mode while searching callsign in database
This commit is contained in:
@@ -407,14 +407,12 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
rds.picode[i] += 'A' - 10; // Add ASCII offset for hexadecimal letters A-F
|
||||
}
|
||||
}
|
||||
rds.picodetext = rds.picode;
|
||||
}
|
||||
|
||||
if (!rdsAerrorThreshold && !rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold) {
|
||||
rds.picode[4] = ' ';
|
||||
rds.picode[5] = ' ';
|
||||
errorfreepi = true;
|
||||
rds.picodetext = rds.picode;
|
||||
}
|
||||
|
||||
if (!errorfreepi) {
|
||||
@@ -1435,7 +1433,6 @@ void TEF6686::clearRDS (bool fullsearchrds) {
|
||||
rds.PTYN = "";
|
||||
rds.ECCtext = "";
|
||||
rds.LICtext = "";
|
||||
rds.picodetext = "";
|
||||
rds.stationIDtext = "";
|
||||
rds.stationStatetext = "";
|
||||
|
||||
|
||||
@@ -560,7 +560,6 @@ typedef struct _rds_ {
|
||||
String PTYN;
|
||||
String ECCtext;
|
||||
String LICtext;
|
||||
String picodetext;
|
||||
String stationIDtext;
|
||||
String stationStatetext;
|
||||
char stationType[18];
|
||||
|
||||
@@ -396,13 +396,13 @@ void readRds() {
|
||||
}
|
||||
|
||||
void showPI() {
|
||||
if ((region == REGION_US && (radio.rds.picodetext != PIold || radio.rds.stationIDtext != stationIDold || radio.rds.stationStatetext != stationStateold)) || (region != REGION_US && radio.rds.picodetext != PIold)) {
|
||||
if ((region == REGION_US && (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold || radio.rds.stationStatetext != stationStateold)) || (region != REGION_US && String(radio.rds.picode) != PIold)) {
|
||||
if (!afscreen && !radio.rds.rdsAerror && !radio.rds.rdsBerror && !radio.rds.rdsCerror && !radio.rds.rdsDerror && radio.rds.rdsA != radio.rds.correctPI && PIold.length() > 1) radio.clearRDS(fullsearchrds);
|
||||
if (!screenmute) {
|
||||
if (advancedRDS) {
|
||||
if (region == REGION_EU) tftReplace(0, PIold, radio.rds.picode, 275, 75, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (region == REGION_US) {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 240, 72, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 72, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 89, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(1, stationStateold, radio.rds.stationState, 318, 89, SecondaryColor, SecondaryColorSmooth, 16);
|
||||
}
|
||||
@@ -411,7 +411,7 @@ void showPI() {
|
||||
} else {
|
||||
if (region == REGION_EU) tftReplace(0, PIold, radio.rds.picode, 275, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (region == REGION_US) {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 240, 184, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 184, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 201, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(1, stationStateold, radio.rds.stationState, 318, 201, SecondaryColor, SecondaryColorSmooth, 16);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user