You've already forked TEF6686_ESP32
Blue-out AF/EON/RT+ ticker on RDS loss
This commit is contained in:
@@ -710,9 +710,6 @@ void BuildAdvancedRDS() {
|
||||
BWreset = true;
|
||||
pinstringold = "";
|
||||
hasrtplusold = false;
|
||||
eonstringold = "";
|
||||
afstringold = "";
|
||||
rtplusstringold = "";
|
||||
afmethodBold = false;
|
||||
rds_clockold = "";
|
||||
ShowMemoryPos();
|
||||
|
||||
@@ -145,16 +145,13 @@ extern int16_t SStatus;
|
||||
extern int8_t LevelOffset;
|
||||
extern int8_t LowLevelSet;
|
||||
extern int8_t VolSet;
|
||||
extern String afstringold;
|
||||
extern String CurrentThemeString;
|
||||
extern String eonpsold[20];
|
||||
extern String eonstringold;
|
||||
extern String PIold;
|
||||
extern String pinstringold;
|
||||
extern String PSold;
|
||||
extern String ptynold;
|
||||
extern String rds_clockold;
|
||||
extern String rtplusstringold;
|
||||
extern String stationIDold;
|
||||
extern String stationStateold;
|
||||
extern String XDRGTK_key;
|
||||
|
||||
108
src/rds.cpp
108
src/rds.cpp
@@ -69,34 +69,23 @@ void ShowAdvancedRDS() {
|
||||
hasafold = radio.rds.hasAF;
|
||||
}
|
||||
|
||||
if (afstring.length() < 20) {
|
||||
if (afstringold != afstring) {
|
||||
xPos2 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RDSSprite.drawString(afstring, xPos2, 2);
|
||||
RDSSprite.pushSprite(35, 197);
|
||||
}
|
||||
} else {
|
||||
if (millis() - afticker >= 15) {
|
||||
if (xPos2 == 0) {
|
||||
if (millis() - aftickerhold >= 2000) {
|
||||
xPos2 --;
|
||||
aftickerhold = millis();
|
||||
}
|
||||
} else {
|
||||
if (millis() - afticker >= 15) {
|
||||
if (xPos2 == 0) {
|
||||
if (millis() - aftickerhold >= 2000) {
|
||||
xPos2 --;
|
||||
aftickerhold = millis();
|
||||
}
|
||||
if (xPos2 < -tft.textWidth(afstring) + (charWidth * 14)) xPos2 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RDSSprite.drawString(afstring, xPos2, 2);
|
||||
RDSSprite.pushSprite(35, 197);
|
||||
afticker = millis();
|
||||
} else {
|
||||
xPos2 --;
|
||||
aftickerhold = millis();
|
||||
}
|
||||
if (xPos2 < -tft.textWidth(afstring) + (charWidth * 14)) xPos2 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RDSSprite.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
RDSSprite.drawString(afstring, xPos2, 2);
|
||||
RDSSprite.pushSprite(35, 197);
|
||||
afticker = millis();
|
||||
}
|
||||
afstringold = afstring;
|
||||
|
||||
String eonstring;
|
||||
if (radio.rds.hasEON) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? " " : " | "); else eonstring = myLanguage[language][88];
|
||||
@@ -106,34 +95,25 @@ void ShowAdvancedRDS() {
|
||||
}
|
||||
haseonold = radio.rds.hasEON;
|
||||
}
|
||||
if (eonstring.length() < 20) {
|
||||
if (eonstringold != eonstring) {
|
||||
xPos3 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RDSSprite.drawString(eonstring, xPos3, 2);
|
||||
RDSSprite.pushSprite(35, 172);
|
||||
}
|
||||
} else {
|
||||
if (millis() - eonticker >= 15) {
|
||||
if (xPos3 == 0) {
|
||||
if (millis() - eontickerhold >= 2000) {
|
||||
xPos3 --;
|
||||
eontickerhold = millis();
|
||||
}
|
||||
} else {
|
||||
|
||||
if (millis() - eonticker >= 15) {
|
||||
if (xPos3 == 0) {
|
||||
if (millis() - eontickerhold >= 2000) {
|
||||
xPos3 --;
|
||||
eontickerhold = millis();
|
||||
}
|
||||
if (xPos3 < -tft.textWidth(eonstring) + (charWidth * 14)) xPos3 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RDSSprite.drawString(eonstring, xPos3, 2);
|
||||
RDSSprite.pushSprite(35, 172);
|
||||
eonticker = millis();
|
||||
} else {
|
||||
xPos3 --;
|
||||
eontickerhold = millis();
|
||||
}
|
||||
if (xPos3 < -tft.textWidth(eonstring) + (charWidth * 14)) xPos3 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RDSSprite.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
RDSSprite.drawString(eonstring, xPos3, 2);
|
||||
RDSSprite.pushSprite(35, 172);
|
||||
eonticker = millis();
|
||||
}
|
||||
eonstringold = eonstring;
|
||||
|
||||
|
||||
String rtplusstring;
|
||||
if (radio.rds.hasRDSplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(myLanguage[language][radio.rds.rdsplusTag1]) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(myLanguage[language][radio.rds.rdsplusTag2]) + ": " + String(radio.rds.RTContent2) : "") + " "; else rtplusstring = myLanguage[language][89];
|
||||
@@ -143,34 +123,24 @@ void ShowAdvancedRDS() {
|
||||
}
|
||||
hasrtplusold = radio.rds.hasRDSplus;
|
||||
}
|
||||
if (rtplusstring.length() < 20) {
|
||||
if (rtplusstringold != rtplusstring) {
|
||||
xPos4 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RDSSprite.drawString(rtplusstring, xPos4, 2);
|
||||
RDSSprite.pushSprite(35, 146);
|
||||
}
|
||||
} else {
|
||||
if (millis() - rtplusticker >= 15) {
|
||||
if (xPos4 == 0) {
|
||||
if (millis() - rtplustickerhold >= 2000) {
|
||||
xPos4 --;
|
||||
rtplustickerhold = millis();
|
||||
}
|
||||
} else {
|
||||
|
||||
if (millis() - rtplusticker >= 15) {
|
||||
if (xPos4 == 0) {
|
||||
if (millis() - rtplustickerhold >= 2000) {
|
||||
xPos4 --;
|
||||
rtplustickerhold = millis();
|
||||
}
|
||||
if (xPos4 < -tft.textWidth(rtplusstring) + (charWidth * 14)) xPos4 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RDSSprite.drawString(rtplusstring, xPos4, 2);
|
||||
RDSSprite.pushSprite(35, 146);
|
||||
rtplusticker = millis();
|
||||
} else {
|
||||
xPos4 --;
|
||||
rtplustickerhold = millis();
|
||||
}
|
||||
if (xPos4 < -tft.textWidth(rtplusstring) + (charWidth * 14)) xPos4 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RDSSprite.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
RDSSprite.drawString(rtplusstring, xPos4, 2);
|
||||
RDSSprite.pushSprite(35, 146);
|
||||
rtplusticker = millis();
|
||||
}
|
||||
rtplusstringold = rtplusstring;
|
||||
|
||||
if (TPold != radio.rds.hasTP) {
|
||||
if (!screenmute) {
|
||||
|
||||
@@ -71,11 +71,9 @@ extern int xPos2;
|
||||
extern int xPos3;
|
||||
extern int xPos4;
|
||||
extern IPAddress remoteip;
|
||||
extern String afstringold;
|
||||
extern String AIDString;
|
||||
extern String ECColdtxt;
|
||||
extern String eonpsold[20];
|
||||
extern String eonstringold;
|
||||
extern String LIColdString;
|
||||
extern String pinstringold;
|
||||
extern String PIold;
|
||||
@@ -87,7 +85,6 @@ extern String rds_clockold;
|
||||
extern String RDSSPYRDS;
|
||||
extern String RDSSPYRDSold;
|
||||
extern String RTold;
|
||||
extern String rtplusstringold;
|
||||
extern String stationIDold;
|
||||
extern String stationStateold;
|
||||
extern String XDRGTKRDS;
|
||||
|
||||
Reference in New Issue
Block a user