Skin adjustments
Fix a bug on callsign display
This commit is contained in:
+3
-4
@@ -575,11 +575,10 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
}
|
||||
|
||||
if (faultyID) {
|
||||
for (byte i = 0; i < 9; i++) {
|
||||
rds.stationID[i] = ' ';
|
||||
}
|
||||
strcpy(rds.stationID, "Unknown");
|
||||
} else {
|
||||
rds.stationID[7] = '?';
|
||||
}
|
||||
rds.stationID[7] = '?';
|
||||
rds.stationID[8] = '\0';
|
||||
}
|
||||
correctPIold = rds.correctPI;
|
||||
|
||||
+491
-491
File diff suppressed because it is too large
Load Diff
+7
-1
@@ -430,6 +430,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
BackgroundColor2 = 0x0044;
|
||||
BackgroundColor3 = 0x00a2;
|
||||
BackgroundColor4 = 0x00c6;
|
||||
BackgroundColor5 = 0x0001;
|
||||
ActiveColor = White;
|
||||
ActiveColorSmooth = WhiteSmooth;
|
||||
FreqColor = 0x1ff7;
|
||||
@@ -1630,9 +1631,14 @@ void BuildDisplay() {
|
||||
tft.drawLine(178, 219, 313, 219, FrameColor);
|
||||
tft.drawLine(18, 219, 153, 219, FrameColor);
|
||||
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 8, 104, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 8, 97, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "ID:", 8, 111, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
|
||||
tftPrint(-1, "S", 6, 214, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "M", 162, 214, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "PI:", 8, 104, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (usesquelch) tftPrint(1, "SQ:", 276, 168, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, unitString[unit], 312, 108, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "dB", 312, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
@@ -127,6 +127,7 @@ extern int BackgroundColor1;
|
||||
extern int BackgroundColor2;
|
||||
extern int BackgroundColor3;
|
||||
extern int BackgroundColor4;
|
||||
extern int BackgroundColor5;
|
||||
extern int BarInsignificantColor;
|
||||
extern int BarSignificantColor;
|
||||
extern int BatteryValueColor;
|
||||
|
||||
+58
-19
@@ -305,9 +305,21 @@ void readRds() {
|
||||
}
|
||||
|
||||
if (region == REGION_US) {
|
||||
if (advancedRDS) tftPrint(-1, PIold, 240, 72, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftPrint(-1, PIold, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(-1, stationIDold, 240, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftPrint(-1, stationIDold, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(1, stationStateold, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftPrint(1, stationStateold, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (advancedRDS) {
|
||||
tftPrint(-1, PIold, 240, 72, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 240, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(1, stationStateold, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
tftPrint(-1, PIold, 30, 97, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 30, 111, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(1, stationStateold, 108, 111, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(-1, PIold, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(1, stationStateold, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (advancedRDS) {
|
||||
@@ -349,13 +361,26 @@ void readRds() {
|
||||
if (advancedRDS) {
|
||||
tftPrint(0, PIold, 275, 75, RDSColor, RDSColorSmooth, 28);
|
||||
} else {
|
||||
if (CurrentSkin == 1) tftPrint(-1, PIold, 30, 99, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, PIold, 275, 187, RDSColor, RDSColor, 28);
|
||||
if (CurrentSkin == 1) tftPrint(-1, PIold, 30, 99, FreqColor, FreqColorSmooth, 28); else tftPrint(0, PIold, 275, 187, RDSColor, RDSColor, 28);
|
||||
}
|
||||
}
|
||||
|
||||
if (region == REGION_US) {
|
||||
if (advancedRDS) tftPrint(-1, PIold, 240, 72, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, PIold, 240, 184, RDSColor, RDSColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(-1, stationIDold, 240, 89, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, stationIDold, 240, 201, RDSColor, RDSColorSmooth, 16);
|
||||
if (advancedRDS) {
|
||||
tftPrint(-1, PIold, 240, 72, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 240, 89, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(1, stationStateold, 318, 89, RDSColor, RDSColorSmooth, 16);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
tftPrint(-1, PIold, 30, 97, FreqColor, FreqColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 30, 111, FreqColor, FreqColorSmooth, 16);
|
||||
tftPrint(1, stationStateold, 108, 111, FreqColor, FreqColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(-1, PIold, 240, 184, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 240, 201, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(1, stationStateold, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (advancedRDS) {
|
||||
@@ -363,7 +388,7 @@ void readRds() {
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
PSSprite.pushImage (-8, -154, 320, 240, skin1_mainbackground);
|
||||
PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
PSSprite.setTextColor(FreqColor, FreqColorSmooth, false);
|
||||
PSSprite.drawString(PSold, 84, 1);
|
||||
PSSprite.pushSprite(8, 154);
|
||||
} else {
|
||||
@@ -622,12 +647,12 @@ void showPI() {
|
||||
if (region == REGION_US) {
|
||||
if (!RDSstatus) {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 72, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 89, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 240, 89, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
} else {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 72, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 89, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 240, 89, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
tftReplace(1, stationStateold, radio.rds.stationState, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(1, stationStateold, radio.rds.stationStatetext, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
} else if (afscreen) {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 30, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16);
|
||||
@@ -636,23 +661,37 @@ void showPI() {
|
||||
if (!RDSstatus) {
|
||||
if (CurrentSkin == 1) tftReplace(-1, PIold, radio.rds.picode, 30, 99, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor2, 28); else tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 28);
|
||||
} else {
|
||||
if (CurrentSkin == 1) tftReplace(-1, PIold, radio.rds.picode, 30, 99, PrimaryColor, PrimaryColorSmooth, BackgroundColor2, 28); else tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, BackgroundColor, 28);
|
||||
if (CurrentSkin == 1) tftReplace(-1, PIold, radio.rds.picode, 30, 99, FreqColor, FreqColorSmooth, BackgroundColor2, 28); else tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, BackgroundColor, 28);
|
||||
}
|
||||
}
|
||||
if (region == REGION_US) {
|
||||
if (!RDSstatus) {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
if (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold) {
|
||||
if (CurrentSkin == 1) {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 30, 97, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 30, 111, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
} else {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 201, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
if (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold) {
|
||||
if (CurrentSkin == 1) {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 30, 97, FreqColor, FreqColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 30, 111, FreqColor, FreqColorSmooth, BackgroundColor, 16);
|
||||
} else {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 240, 201, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
tftReplace(1, stationStateold, radio.rds.stationState, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
if (CurrentSkin == 1) tftReplace(1, stationStateold, radio.rds.stationStatetext, 108, 111, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); else tftReplace(1, stationStateold, radio.rds.stationStatetext, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
PIold = radio.rds.picode;
|
||||
stationIDold = radio.rds.stationID;
|
||||
stationStateold = radio.rds.stationState;
|
||||
stationIDold = radio.rds.stationIDtext;
|
||||
stationStateold = radio.rds.stationStatetext;
|
||||
}
|
||||
if (wifi) {
|
||||
Udp.beginPacket(remoteip, 9030);
|
||||
@@ -714,7 +753,7 @@ void showPS() {
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
PSSprite.pushImage (-8, -154, 320, 240, skin1_mainbackground);
|
||||
PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
PSSprite.setTextColor(FreqColor, FreqColorSmooth, false);
|
||||
PSSprite.drawString(radio.rds.stationName, 84, 1);
|
||||
PSSprite.pushSprite(8, 154);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user