make on edge stuff that doesnt need to scroll, not scroll

This commit is contained in:
2026-01-16 20:54:07 +01:00
parent 25c6044d3f
commit 266959b0f4
2 changed files with 9 additions and 10 deletions

View File

@@ -352,4 +352,4 @@ ScrollingTextDisplay lpsDisplay(&PSSprite, 0, 150);
ScrollingTextDisplay rtplusDisplay(&GeneralTextSprite, 147, 173, 35, 19); ScrollingTextDisplay rtplusDisplay(&GeneralTextSprite, 147, 173, 35, 19);
ScrollingTextDisplay eonDisplay(&GeneralTextSprite, 174, 173, 35, 19); ScrollingTextDisplay eonDisplay(&GeneralTextSprite, 174, 173, 35, 19);
ScrollingTextDisplay eccDisplay(&FullLineSprite, 198, 270); ScrollingTextDisplay eccDisplay(&FullLineSprite, 198, 270);
ScrollingTextDisplay rtDisplay(&FullLineSprite, 220, 270); ScrollingTextDisplay rtDisplay(&FullLineSprite, 220, 268); // 268 bc of the A/B thing

View File

@@ -68,7 +68,7 @@ void ShowAdvancedRDS() {
if(!screenmute) eccDisplay.update(ECCString, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor); if(!screenmute) eccDisplay.update(ECCString, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
String eonstring; String eonstring;
if (radio.eon_counter > 0) 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 = textUI(87); if (radio.eon_counter > 0) 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 = textUI(87);
if (radio.rds.hasEON.changed(0)) { if (radio.rds.hasEON.changed(0)) {
if (!screenmute) { if (!screenmute) {
if (radio.eon_counter > 0) tftPrint(ALEFT, "EON", 153, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "EON", 153, 51, GreyoutColor, BackgroundColor, 16); if (radio.eon_counter > 0) tftPrint(ALEFT, "EON", 153, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
@@ -78,7 +78,7 @@ void ShowAdvancedRDS() {
if(!screenmute) eonDisplay.update(eonstring, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor); if(!screenmute) eonDisplay.update(eonstring, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
String rtplusstring; String rtplusstring;
if (radio.rds.hasRTplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : "") + " "; else rtplusstring = textUI(88); if (radio.rds.hasRTplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : ""); else rtplusstring = textUI(88);
if (radio.rds.hasRTplus.changed(0)) { if (radio.rds.hasRTplus.changed(0)) {
if (!screenmute) { if (!screenmute) {
if (radio.rds.hasRTplus) tftPrint(ALEFT, "RT+", 123, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16); if (radio.rds.hasRTplus) tftPrint(ALEFT, "RT+", 123, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
@@ -431,13 +431,12 @@ void showPS() {
if (!screenmute) tftReplace(ACENTER, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16); if (!screenmute) tftReplace(ACENTER, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16);
} else if (!rdsstatscreen) { } else if (!rdsstatscreen) {
if (radio.rds.hasLongPS && showlongps) { if (radio.rds.hasLongPS && showlongps) {
String stationNameLongString = String(radio.rds.stationNameLong) + " "; if (radio.rds.stationNameLong != stationNameLongOld) {
if (stationNameLongString != stationNameLongOld) { PSLongWidth = PSSprite.textWidth(radio.rds.stationNameLong); // Measure new width
PSLongWidth = PSSprite.textWidth(stationNameLongString); // Measure new width stationNameLongOld = radio.rds.stationNameLong;
stationNameLongOld = stationNameLongString;
} }
lpsDisplay.update(stationNameLongString, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor); lpsDisplay.update(radio.rds.stationNameLong, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
} else { } else {
lpsDisplay.reset(); lpsDisplay.reset();
PSSprite.fillSprite(BackgroundColor); PSSprite.fillSprite(BackgroundColor);
@@ -532,7 +531,7 @@ void showCT() {
} }
void showRadioText() { void showRadioText() {
String RTString = String(radio.rds.stationText + (radio.rds.stationText.length() > 0 ? " " : "") + radio.rds.stationText32 + (radio.rds.hasEnhancedRT ? " eRT: " + String(radio.rds.enhancedRTtext) : "") + " "); String RTString = String(radio.rds.stationText + (radio.rds.stationText.length() > 0 ? " " : "") + radio.rds.stationText32 + (radio.rds.hasEnhancedRT ? " eRT: " + String(radio.rds.enhancedRTtext) : ""));
if (radio.rds.hasRT && radio.rds.rtAB != rtABold) { if (radio.rds.hasRT && radio.rds.rtAB != rtABold) {
rtDisplay.reset(); rtDisplay.reset();
@@ -733,7 +732,7 @@ void ShowAFEON() {
aid_counterold = radio.rds.aid_counter; aid_counterold = radio.rds.aid_counter;
if (AIDStringTemp != AIDStringold) { if (AIDStringTemp != AIDStringold) {
AIDString = String(textUI(32)) + " - " + String(textUI(78)) + ": " + AIDStringTemp + " "; AIDString = String(textUI(32)) + " - " + String(textUI(78)) + ": " + AIDStringTemp;
AIDWidth = FullLineSprite.textWidth(AIDString); AIDWidth = FullLineSprite.textWidth(AIDString);
AIDStringold = AIDString; AIDStringold = AIDString;
} }