More work on skin
This commit is contained in:
+107
-75
@@ -368,8 +368,11 @@ TFT_eSprite SquelchSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite FullLineSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite OneBigLineSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite SignalSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite BWSignalSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite CTBWSignalSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite MemorySprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite PSSprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite PISprite = TFT_eSprite(&tft);
|
||||
TFT_eSprite PTYSprite = TFT_eSprite(&tft);
|
||||
|
||||
WiFiConnect wc;
|
||||
WiFiServer Server(7373);
|
||||
@@ -558,6 +561,7 @@ void setup() {
|
||||
|
||||
RadiotextSprite.createSprite(270, 19);
|
||||
RadiotextSprite.setTextDatum(TL_DATUM);
|
||||
RadiotextSprite.setSwapBytes(true);
|
||||
|
||||
FrequencySprite.createSprite(200, 50);
|
||||
FrequencySprite.setTextDatum(TR_DATUM);
|
||||
@@ -581,16 +585,30 @@ void setup() {
|
||||
SignalSprite.setTextDatum(TR_DATUM);
|
||||
SignalSprite.setSwapBytes(true);
|
||||
|
||||
BWSignalSprite.createSprite(42, 26);
|
||||
BWSignalSprite.setTextDatum(TR_DATUM);
|
||||
BWSignalSprite.loadFont(FONT28);
|
||||
BWSignalSprite.setSwapBytes(true);
|
||||
CTBWSignalSprite.createSprite(42, 26);
|
||||
CTBWSignalSprite.loadFont(FONT16);
|
||||
CTBWSignalSprite.setSwapBytes(true);
|
||||
|
||||
MemorySprite.createSprite(18, 18);
|
||||
MemorySprite.setTextDatum(TL_DATUM);
|
||||
MemorySprite.loadFont(FONT16);
|
||||
MemorySprite.setSwapBytes(true);
|
||||
|
||||
PSSprite.createSprite(168, 30);
|
||||
PSSprite.setTextDatum(TC_DATUM);
|
||||
PSSprite.loadFont(FONT28);
|
||||
PSSprite.setSwapBytes(true);
|
||||
|
||||
PISprite.createSprite(88, 30);
|
||||
PISprite.setTextDatum(TL_DATUM);
|
||||
PISprite.loadFont(FONT28);
|
||||
PISprite.setSwapBytes(true);
|
||||
|
||||
PTYSprite.createSprite(130, 18);
|
||||
PTYSprite.setTextDatum(TC_DATUM);
|
||||
PTYSprite.loadFont(FONT16);
|
||||
PTYSprite.setSwapBytes(true);
|
||||
|
||||
UpdateFonts();
|
||||
|
||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH) {
|
||||
@@ -846,30 +864,32 @@ void loop() {
|
||||
|
||||
if ((SStatus / 10 > LowLevelSet) && !LowLevelInit && !menu && band < BAND_GAP) {
|
||||
if (!screenmute && !advancedRDS && !afscreen) {
|
||||
if (showmodulation) {
|
||||
tftPrint(-1, "10", 27, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "30", 57, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "50", 87, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "70", 117, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(0, "M", 7, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
for (byte segments = 0; segments < 94; segments++) {
|
||||
if (segments > 54) {
|
||||
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, BarSignificantColor);
|
||||
} else {
|
||||
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, ModBarInsignificantColor);
|
||||
if (CurrentSkin != 1) {
|
||||
if (showmodulation) {
|
||||
tftPrint(-1, "10", 27, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "30", 57, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "50", 87, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "70", 117, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(0, "M", 7, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
for (byte segments = 0; segments < 94; segments++) {
|
||||
if (segments > 54) {
|
||||
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, BarSignificantColor);
|
||||
} else {
|
||||
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, ModBarInsignificantColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 212, 184, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "ID:", 212, 201, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
tftPrint(-1, "PS:", 3, 193, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "RT:", 3, 221, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "PTY:", 3, 163, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (!showmodulation) tft.drawLine(20, 143, 204, 143, GreyoutColor); else tft.drawLine(20, 143, 204, 143, TFT_DARKGREY);
|
||||
}
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 212, 184, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "ID:", 212, 201, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
tftPrint(-1, "PS:", 3, 193, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "RT:", 3, 221, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "PTY:", 3, 163, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (!showmodulation) tft.drawLine(20, 143, 204, 143, GreyoutColor); else tft.drawLine(20, 143, 204, 143, TFT_DARKGREY);
|
||||
}
|
||||
LowLevelInit = true;
|
||||
}
|
||||
@@ -877,32 +897,34 @@ void loop() {
|
||||
if ((SStatus / 10 <= LowLevelSet) && band < BAND_GAP) {
|
||||
if (LowLevelInit && !menu) {
|
||||
if (!screenmute && !afscreen && !advancedRDS) {
|
||||
for (byte segments = 0; segments < 94; segments++) {
|
||||
if (segments > 54) {
|
||||
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
|
||||
} else {
|
||||
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
|
||||
if (CurrentSkin != 1) {
|
||||
for (byte segments = 0; segments < 94; segments++) {
|
||||
if (segments > 54) {
|
||||
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
|
||||
} else {
|
||||
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
|
||||
}
|
||||
}
|
||||
if (showmodulation) {
|
||||
tftPrint(-1, "10", 27, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "30", 57, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "50", 87, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "70", 117, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "100", 164, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(0, "M", 7, 128, GreyoutColor, BackgroundColor, 16);
|
||||
tft.fillRect(16, 133, 188, 6, GreyoutColor);
|
||||
}
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, GreyoutColor, BackgroundColor, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 212, 184, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "ID:", 212, 201, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
|
||||
tft.drawLine(20, 143, 204, 143, GreyoutColor);
|
||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
}
|
||||
if (showmodulation) {
|
||||
tftPrint(-1, "10", 27, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "30", 57, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "50", 87, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "70", 117, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "100", 164, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(0, "M", 7, 128, GreyoutColor, BackgroundColor, 16);
|
||||
tft.fillRect(16, 133, 188, 6, GreyoutColor);
|
||||
}
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, GreyoutColor, BackgroundColor, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 212, 184, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "ID:", 212, 201, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
|
||||
tft.drawLine(20, 143, 204, 143, GreyoutColor);
|
||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
}
|
||||
LowLevelInit = false;
|
||||
}
|
||||
@@ -1780,23 +1802,24 @@ void SelectBand() {
|
||||
radio.setAMAttenuation(amgain);
|
||||
radio.setAMCoChannel(amcodect, amcodectcount);
|
||||
doBW();
|
||||
if (!screenmute) {
|
||||
BuildDisplay();
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, GreyoutColor, BackgroundColor, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 212, 184, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "ID:", 212, 201, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
/* if (!screenmute) {
|
||||
BuildDisplay();
|
||||
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, GreyoutColor, BackgroundColor, 16);
|
||||
if (region == REGION_US) {
|
||||
tftPrint(-1, "PI:", 212, 184, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "ID:", 212, 201, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
|
||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
||||
tftPrint(0, "iMS", 265, 59, GreyoutColor, BackgroundColor, 16);
|
||||
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
||||
tftPrint(0, "EQ", 303, 59, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
|
||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
||||
tftPrint(0, "iMS", 265, 59, GreyoutColor, BackgroundColor, 16);
|
||||
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
||||
tftPrint(0, "EQ", 303, 59, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
if (tunemode == TUNE_MI_BAND) tunemode = TUNE_MAN;
|
||||
radio.power(0);
|
||||
@@ -2593,10 +2616,15 @@ void ShowFreq(int mode) {
|
||||
if (!rdsflagreset && !screenmute && !afscreen) {
|
||||
ShowRDSLogo(false);
|
||||
if (!advancedRDS) {
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
if (CurrentSkin == 1) {
|
||||
RadiotextSprite.pushImage (-25, -188, 320, 240, mainbackground);
|
||||
RadiotextSprite.pushSprite(25, 188);
|
||||
} else {
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
}
|
||||
} else {
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
tft.fillCircle(203, 223, 2, GreyoutColor);
|
||||
@@ -2830,11 +2858,15 @@ void ShowBW() {
|
||||
}
|
||||
|
||||
if (BW != BWOld || BWreset) {
|
||||
if (CurrentSkin == 1) {
|
||||
BWSignalSprite.pushImage (-124, -99, 320, 240, mainbackground);
|
||||
if (BWset == 0) BWSignalSprite.setTextColor(BWAutoColor, BWAutoColorSmooth, false); else BWSignalSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
BWSignalSprite.drawString(String(BW, DEC), 40, 0);
|
||||
BWSignalSprite.pushSprite(124, 99);
|
||||
if (CurrentSkin == 1 && !advancedRDS) {
|
||||
CTBWSignalSprite.pushImage (-124, -99, 320, 240, mainbackground);
|
||||
CTBWSignalSprite.setTextDatum(TR_DATUM);
|
||||
CTBWSignalSprite.loadFont(FONT28);
|
||||
if (BWset == 0) CTBWSignalSprite.setTextColor(BWAutoColor, BWAutoColorSmooth, false); else CTBWSignalSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
CTBWSignalSprite.drawString(String(BW, DEC), 40, 0);
|
||||
CTBWSignalSprite.unloadFont();
|
||||
CTBWSignalSprite.loadFont(FONT16);
|
||||
CTBWSignalSprite.pushSprite(124, 99);
|
||||
} else {
|
||||
if (BWset == 0) tftReplace(1, String (BWOld, DEC), String (BW, DEC), 201, 4, BWAutoColor, BWAutoColorSmooth, 28); else tftReplace(1, String (BWOld, DEC), String (BW, DEC), 201, 4, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
}
|
||||
|
||||
@@ -1602,7 +1602,11 @@ void BuildDisplay() {
|
||||
case BAND_OIRT: tftPrint(1, myLanguage[language][106], 54, 29, bandColor, PrimaryColorSmooth, 16); break;
|
||||
}
|
||||
|
||||
tftPrint(-1, "PI:", 8, 104, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (usesquelch) tftPrint(1, "SQ:", 268, 168, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, unitString[unit], 310, 102, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "dB", 310, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "C/N", 266, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "kHz", 170, 99, ActiveColor, ActiveColorSmooth, 28);
|
||||
if (band < BAND_GAP) tftPrint(-1, "MHz", 262, 66, ActiveColor, ActiveColorSmooth, 28); else tftPrint(-1, "kHz", 262, 66, ActiveColor, ActiveColorSmooth, 28);
|
||||
break;
|
||||
|
||||
+245
-92
@@ -3,6 +3,7 @@
|
||||
#include "rds.h"
|
||||
#include "language.h"
|
||||
#include "constants.h"
|
||||
#include "graphics.h"
|
||||
#include <TimeLib.h>
|
||||
|
||||
int Radiotextlengthold;
|
||||
@@ -296,7 +297,17 @@ void readRds() {
|
||||
if (!RDSstatus) {
|
||||
if (radio.rds.correctPI != 0 && !dropout) {
|
||||
if (region == REGION_EU) {
|
||||
if (advancedRDS) tftPrint(0, PIold, 275, 75, RDSDropoutColor, RDSDropoutColorSmooth, 28); else tftPrint(0, PIold, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
if (advancedRDS) {
|
||||
tftPrint(0, PIold, 275, 75, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
if (CurrentSkin == 1) PISprite.pushImage (-26, -98, 320, 240, mainbackground);
|
||||
if (CurrentSkin == 1) PISprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); else tftPrint(0, PIold, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
|
||||
if (CurrentSkin == 1) {
|
||||
PISprite.drawString(radio.rds.picode, 4, 1);
|
||||
PISprite.pushSprite(26, 98);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (region == REGION_US) {
|
||||
@@ -305,36 +316,66 @@ void readRds() {
|
||||
if (advancedRDS) tftPrint(1, stationStateold, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftPrint(1, stationStateold, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
|
||||
if (advancedRDS) tftPrint(-1, PSold, 36, 75, RDSDropoutColor, RDSDropoutColorSmooth, 28); else tftPrint(-1, PSold, 36, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(-1, PTYold, 36, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftPrint(-1, PTYold, 36, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (advancedRDS) {
|
||||
tftPrint(-1, PSold, 36, 75, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
PSSprite.pushImage (-8, -154, 320, 240, mainbackground);
|
||||
PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
PSSprite.drawString(PSold, 84, 1);
|
||||
PSSprite.pushSprite(8, 154);
|
||||
} else {
|
||||
tftPrint(-1, PSold, 36, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
if (advancedRDS) {
|
||||
tftPrint(-1, PTYold, 36, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
PTYSprite.pushImage (-40, -130, 320, 240, mainbackground);
|
||||
PTYSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
PTYSprite.drawString(radio.rds.stationType, 65, 0);
|
||||
PTYSprite.pushSprite(40, 130);
|
||||
} else {
|
||||
tftPrint(-1, PTYold, 36, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
if (advancedRDS) {
|
||||
tft.fillCircle(86, 41, 5, SignificantColor);
|
||||
tft.fillCircle(124, 41, 5, SignificantColor);
|
||||
tft.fillCircle(162, 41, 5, SignificantColor);
|
||||
tft.fillCircle(200, 41, 5, SignificantColor);
|
||||
}
|
||||
|
||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||
xPos = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RDSSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RDSSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
RDSSprite.pushSprite(36, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
xPos = 0;
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
}
|
||||
|
||||
/*
|
||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||
xPos = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RDSSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RDSSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
RDSSprite.pushSprite(36, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
xPos = 0;
|
||||
if (CurrentSkin == 1) RadiotextSprite.pushImage (-25, -188, 320, 240, mainbackground); else RadiotextSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
if (CurrentSkin == 1) RadiotextSprite.pushSprite(25, 188); else RadiotextSprite.pushSprite(36, 220);
|
||||
}
|
||||
*/
|
||||
if (radio.rds.hasCT) {
|
||||
if (advancedRDS) {
|
||||
tftPrint(1, rds_clock, 205, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(1, rds_clock, 205, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (CurrentSkin == 1) {
|
||||
CTBWSignalSprite.pushImage (-196, -8, 320, 240, mainbackground);
|
||||
CTBWSignalSprite.setTextDatum(TL_DATUM);
|
||||
CTBWSignalSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
CTBWSignalSprite.drawString(rds_clock, 0, 0);
|
||||
CTBWSignalSprite.pushSprite(196, 8);
|
||||
} else {
|
||||
tftPrint(1, rds_clock, 205, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
dropout = true;
|
||||
@@ -342,7 +383,18 @@ void readRds() {
|
||||
} else {
|
||||
if (dropout) {
|
||||
if (region == REGION_EU) {
|
||||
if (advancedRDS) tftPrint(0, PIold, 275, 75, RDSColor, RDSColorSmooth, 28); else tftPrint(0, PIold, 275, 187, RDSColor, RDSColorSmooth, 28);
|
||||
if (advancedRDS) {
|
||||
tftPrint(0, PIold, 275, 75, RDSColor, RDSColorSmooth, 28);
|
||||
} else {
|
||||
if (CurrentSkin == 1) PISprite.pushImage (-26, -98, 320, 240, mainbackground);
|
||||
if (CurrentSkin == 1) PISprite.setTextColor(RDSColor, RDSColor, false); else tftPrint(0, PIold, 275, 187, RDSColor, RDSColor, 28);
|
||||
|
||||
if (CurrentSkin == 1) {
|
||||
PISprite.drawString(radio.rds.picode, 4, 1);
|
||||
PISprite.pushSprite(26, 98);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (region == REGION_US) {
|
||||
@@ -350,11 +402,35 @@ void readRds() {
|
||||
if (advancedRDS) tftPrint(-1, stationIDold, 240, 89, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, stationIDold, 240, 201, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
|
||||
if (advancedRDS) tftPrint(-1, PSold, 36, 75, RDSColor, RDSColorSmooth, 28); else tftPrint(-1, PSold, 36, 187, RDSColor, RDSColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(-1, PTYold, 36, 109, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, PTYold, 36, 163, RDSColor, RDSColorSmooth, 16);
|
||||
if (advancedRDS) {
|
||||
tftPrint(-1, PSold, 36, 75, RDSColor, RDSColorSmooth, 28);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
PSSprite.pushImage (-8, -154, 320, 240, mainbackground);
|
||||
PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
PSSprite.drawString(PSold, 84, 1);
|
||||
PSSprite.pushSprite(8, 154);
|
||||
} else {
|
||||
tftPrint(-1, PSold, 36, 187, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
if (advancedRDS) {
|
||||
tftPrint(-1, PTYold, 36, 109, RDSColor, RDSColorSmooth, 16);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
PTYSprite.pushImage (-40, -130, 320, 240, mainbackground);
|
||||
PTYSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
PTYSprite.drawString(radio.rds.stationType, 65, 0);
|
||||
PTYSprite.pushSprite(40, 130);
|
||||
} else {
|
||||
tftPrint(-1, PTYold, 36, 163, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
if (!advancedRDS) {
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
if (CurrentSkin != 1) {
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
}
|
||||
} else {
|
||||
tft.fillCircle(203, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(203, 234, 2, GreyoutColor);
|
||||
@@ -369,18 +445,26 @@ void readRds() {
|
||||
RDSSprite.pushSprite(36, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
xPos = 0;
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (CurrentSkin == 1) RadiotextSprite.pushImage (-25, -188, 320, 240, mainbackground); else RadiotextSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
if (CurrentSkin == 1) RadiotextSprite.pushSprite(25, 188); else RadiotextSprite.pushSprite(36, 220);
|
||||
}
|
||||
|
||||
if (radio.rds.hasCT) {
|
||||
if (advancedRDS) {
|
||||
tftPrint(1, rds_clock, 205, 109, RDSColor, RDSColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(1, rds_clock, 205, 163, RDSColor, RDSColorSmooth, 16);
|
||||
if (CurrentSkin == 1) {
|
||||
CTBWSignalSprite.pushImage (-196, -8, 320, 240, mainbackground);
|
||||
CTBWSignalSprite.setTextDatum(TL_DATUM);
|
||||
CTBWSignalSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
||||
CTBWSignalSprite.drawString(rds_clock, 0, 0);
|
||||
CTBWSignalSprite.pushSprite(196, 8);
|
||||
} else {
|
||||
tftPrint(1, rds_clock, 205, 163, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
dropout = false;
|
||||
@@ -463,73 +547,73 @@ void ShowErrors() {
|
||||
if (calc != rdsqualityold || BWreset) {
|
||||
switch (calc) {
|
||||
case 0:
|
||||
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(206, (advancedRDS ? 75 : 187), 2, 22, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 199 : 205), (advancedRDS ? 74 : (CurrentSkin == 1 ? 156 : 186)), 4, 24, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 200 : 206), (advancedRDS ? 75 : (CurrentSkin == 1 ? 157 : 187)), 2, 22, 2, BarInsignificantColor);
|
||||
|
||||
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(200, (advancedRDS ? 80 : 192), 2, 17, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 193 : 199), (advancedRDS ? 79 : (CurrentSkin == 1 ? 160 : 191)), 4, 19, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 194 : 200), (advancedRDS ? 80 : (CurrentSkin == 1 ? 161 : 192)), 2, 17, 2, BarInsignificantColor);
|
||||
|
||||
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(194, (advancedRDS ? 85 : 197), 2, 12, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 187 : 193), (advancedRDS ? 84 : (CurrentSkin == 1 ? 165 : 196)), 4, 14, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 188 : 194), (advancedRDS ? 85 : (CurrentSkin == 1 ? 166 : 197)), 2, 12, 2, BarInsignificantColor);
|
||||
|
||||
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(188, (advancedRDS ? 90 : 202), 2, 7, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 181 : 187), (advancedRDS ? 89 : (CurrentSkin == 1 ? 170 : 201)), 4, 9, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 182 : 188), (advancedRDS ? 90 : (CurrentSkin == 1 ? 171 : 202)), 2, 7, 2, BarInsignificantColor);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect(206, (advancedRDS ? 75 : 187), 2, 22, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 199 : 205), (advancedRDS ? 74 : (CurrentSkin == 1 ? 156 : 186)), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 200 : 206), (advancedRDS ? 75 : (CurrentSkin == 1 ? 157 : 187)), 2, 22, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(200, (advancedRDS ? 80 : 192), 2, 17, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 193 : 199), (advancedRDS ? 79 : (CurrentSkin == 1 ? 160 : 191)), 4, 19, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 194 : 200), (advancedRDS ? 80 : (CurrentSkin == 1 ? 161 : 192)), 2, 17, 2, BarInsignificantColor);
|
||||
|
||||
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(194, (advancedRDS ? 85 : 197), 2, 12, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 187 : 193), (advancedRDS ? 84 : (CurrentSkin == 1 ? 165 : 196)), 4, 14, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 188 : 194), (advancedRDS ? 85 : (CurrentSkin == 1 ? 166 : 197)), 2, 12, 2, BarInsignificantColor);
|
||||
|
||||
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect(188, (advancedRDS ? 90 : 202), 2, 7, 2, BarInsignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 181 : 187), (advancedRDS ? 89 : (CurrentSkin == 1 ? 170 : 201)), 4, 9, 2, BarInsignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 182 : 188), (advancedRDS ? 90 : (CurrentSkin == 1 ? 171 : 202)), 2, 7, 2, BarInsignificantColor);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect(206, (advancedRDS ? 75 : 187), 2, 22, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 199 : 205), (advancedRDS ? 74 : (CurrentSkin == 1 ? 156 : 186)), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 200 : 206), (advancedRDS ? 75 : (CurrentSkin == 1 ? 157 : 187)), 2, 22, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, GreyoutColor);
|
||||
tft.fillRoundRect(200, (advancedRDS ? 80 : 192), 2, 17, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 193 : 199), (advancedRDS ? 79 : (CurrentSkin == 1 ? 160 : 191)), 4, 19, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 194 : 200), (advancedRDS ? 80 : (CurrentSkin == 1 ? 161 : 192)), 2, 17, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, BarSignificantColor);
|
||||
tft.fillRoundRect(194, (advancedRDS ? 85 : 197), 2, 12, 2, BarSignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 187 : 193), (advancedRDS ? 84 : (CurrentSkin == 1 ? 165 : 196)), 4, 14, 2, BarSignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 188 : 194), (advancedRDS ? 85 : (CurrentSkin == 1 ? 166 : 197)), 2, 12, 2, BarSignificantColor);
|
||||
|
||||
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarSignificantColor);
|
||||
tft.fillRoundRect(188, (advancedRDS ? 90 : 202), 2, 7, 2, BarSignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 181 : 187), (advancedRDS ? 89 : (CurrentSkin == 1 ? 170 : 201)), 4, 9, 2, BarSignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 182 : 188), (advancedRDS ? 90 : (CurrentSkin == 1 ? 171 : 202)), 2, 7, 2, BarSignificantColor);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect(206, (advancedRDS ? 75 : 187), 2, 22, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 199 : 205), (advancedRDS ? 74 : (CurrentSkin == 1 ? 156 : 186)), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 200 : 206), (advancedRDS ? 75 : (CurrentSkin == 1 ? 157 : 187)), 2, 22, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, GreyoutColor);
|
||||
tft.fillRoundRect(200, (advancedRDS ? 80 : 192), 2, 17, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 193 : 199), (advancedRDS ? 79 : (CurrentSkin == 1 ? 160 : 191)), 4, 19, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 194 : 200), (advancedRDS ? 80 : (CurrentSkin == 1 ? 161 : 192)), 2, 17, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, GreyoutColor);
|
||||
tft.fillRoundRect(194, (advancedRDS ? 85 : 197), 2, 12, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 187 : 193), (advancedRDS ? 84 : (CurrentSkin == 1 ? 165 : 196)), 4, 14, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 188 : 194), (advancedRDS ? 85 : (CurrentSkin == 1 ? 166 : 197)), 2, 12, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarSignificantColor);
|
||||
tft.fillRoundRect(188, (advancedRDS ? 90 : 202), 2, 7, 2, BarSignificantColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 181 : 187), (advancedRDS ? 89 : (CurrentSkin == 1 ? 170 : 201)), 4, 9, 2, BarSignificantColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 182 : 188), (advancedRDS ? 90 : (CurrentSkin == 1 ? 171 : 202)), 2, 7, 2, BarSignificantColor);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect(206, (advancedRDS ? 75 : 187), 2, 22, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 199 : 205), (advancedRDS ? 74 : (CurrentSkin == 1 ? 156 : 186)), 4, 24, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 200 : 206), (advancedRDS ? 75 : (CurrentSkin == 1 ? 157 : 187)), 2, 22, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, GreyoutColor);
|
||||
tft.fillRoundRect(200, (advancedRDS ? 80 : 192), 2, 17, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 193 : 199), (advancedRDS ? 79 : (CurrentSkin == 1 ? 160 : 191)), 4, 19, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 194 : 200), (advancedRDS ? 80 : (CurrentSkin == 1 ? 161 : 192)), 2, 17, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, GreyoutColor);
|
||||
tft.fillRoundRect(194, (advancedRDS ? 85 : 197), 2, 12, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 187 : 193), (advancedRDS ? 84 : (CurrentSkin == 1 ? 165 : 196)), 4, 14, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 188 : 194), (advancedRDS ? 85 : (CurrentSkin == 1 ? 166 : 197)), 2, 12, 2, BackgroundColor);
|
||||
|
||||
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, GreyoutColor);
|
||||
tft.fillRoundRect(188, (advancedRDS ? 90 : 202), 2, 7, 2, BackgroundColor);
|
||||
tft.drawRoundRect((!advancedRDS && CurrentSkin == 1 ? 181 : 187), (advancedRDS ? 89 : (CurrentSkin == 1 ? 170 : 201)), 4, 9, 2, GreyoutColor);
|
||||
tft.fillRoundRect((!advancedRDS && CurrentSkin == 1 ? 182 : 188), (advancedRDS ? 90 : (CurrentSkin == 1 ? 171 : 202)), 2, 7, 2, BackgroundColor);
|
||||
break;
|
||||
}
|
||||
rdsqualityold = calc;
|
||||
@@ -567,10 +651,16 @@ void showPI() {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 30, 201, BWAutoColor, BWAutoColorSmooth, 16);
|
||||
} else {
|
||||
if (region == REGION_EU) {
|
||||
if (CurrentSkin == 1) PISprite.pushImage (-26, -98, 320, 240, mainbackground);
|
||||
if (!RDSstatus) {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
if (CurrentSkin == 1) PISprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); else tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, 28);
|
||||
if (CurrentSkin == 1) PISprite.setTextColor(RDSColor, RDSColorSmooth, false); else tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
|
||||
if (CurrentSkin == 1) {
|
||||
PISprite.drawString(radio.rds.picode, 4, 1);
|
||||
PISprite.pushSprite(26, 98);
|
||||
}
|
||||
}
|
||||
if (region == REGION_US) {
|
||||
@@ -606,10 +696,15 @@ void showPTY() {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 36, 109, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
} else {
|
||||
if (CurrentSkin == 1) PTYSprite.pushImage (-40, -130, 320, 240, mainbackground);
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 36, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (CurrentSkin == 1) PTYSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); else tftReplace(-1, PTYold, radio.rds.stationType, 36, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 36, 163, RDSColor, RDSColorSmooth, 16);
|
||||
if (CurrentSkin == 1) PTYSprite.setTextColor(RDSColor, RDSColorSmooth, false); else tftReplace(-1, PTYold, radio.rds.stationType, 36, 163, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
if (CurrentSkin == 1) {
|
||||
PTYSprite.drawString(radio.rds.stationType, 65, 0);
|
||||
PTYSprite.pushSprite(40, 130);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -637,9 +732,23 @@ void showPS() {
|
||||
tftReplace(0, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, 16);
|
||||
} else {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 36, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
if (CurrentSkin == 1) {
|
||||
PSSprite.pushImage (-8, -154, 320, 240, mainbackground);
|
||||
PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
PSSprite.drawString(radio.rds.stationName, 84, 1);
|
||||
PSSprite.pushSprite(8, 154);
|
||||
} else {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 36, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
}
|
||||
} else {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 36, 187, RDSColor, RDSColorSmooth, 28);
|
||||
if (CurrentSkin == 1) {
|
||||
PSSprite.pushImage (-8, -154, 320, 240, mainbackground);
|
||||
PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
PSSprite.drawString(radio.rds.stationName, 84, 1);
|
||||
PSSprite.pushSprite(8, 154);
|
||||
} else {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 36, 187, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -675,17 +784,46 @@ void showCT() {
|
||||
if (radio.rds.hasCT && RDSstatus) {
|
||||
rtcset = true;
|
||||
rtc.setTime(0, radio.rds.minute, radio.rds.hour, radio.rds.day, radio.rds.month, radio.rds.year);
|
||||
if (advancedRDS) tftReplace(1, rds_clockold, rds_clock, 205, 109, RDSColor, RDSColorSmooth, 16); else tftReplace(1, rds_clockold, rds_clock, 205, 163, RDSColor, RDSColorSmooth, 16);
|
||||
if (advancedRDS) {
|
||||
tftReplace(1, rds_clockold, rds_clock, 205, 109, RDSColor, RDSColorSmooth, 16);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
CTBWSignalSprite.pushImage (-196, -8, 320, 240, mainbackground);
|
||||
CTBWSignalSprite.setTextDatum(TL_DATUM);
|
||||
CTBWSignalSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
||||
CTBWSignalSprite.drawString(rds_clock, 0, 0);
|
||||
CTBWSignalSprite.pushSprite(196, 8);
|
||||
} else {
|
||||
tftReplace(1, rds_clockold, rds_clock, 205, 163, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (rtcset) {
|
||||
if (advancedRDS) tftReplace(1, rds_clockold, rds_clock, 205, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftReplace(1, rds_clockold, rds_clock, 205, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
if (advancedRDS) {
|
||||
tftReplace(1, rds_clockold, rds_clock, 205, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
if (CurrentSkin == 1) {
|
||||
CTBWSignalSprite.pushImage (-196, -8, 320, 240, mainbackground);
|
||||
CTBWSignalSprite.setTextDatum(TL_DATUM);
|
||||
CTBWSignalSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
CTBWSignalSprite.drawString(rds_clock, 0, 0);
|
||||
CTBWSignalSprite.pushSprite(196, 8);
|
||||
} else {
|
||||
tftReplace(1, rds_clockold, rds_clock, 205, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (advancedRDS) {
|
||||
tftPrint(1, rds_clockold, 205, 109, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(1, rds_clock, 205, 109, BackgroundColor, BackgroundColor, 16);
|
||||
} else {
|
||||
tftPrint(1, rds_clockold, 205, 163, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(1, rds_clock, 205, 163, BackgroundColor, BackgroundColor, 16);
|
||||
if (CurrentSkin == 1) {
|
||||
CTBWSignalSprite.pushImage (-196, -8, 320, 240, mainbackground);
|
||||
CTBWSignalSprite.pushSprite(196, 8);
|
||||
} else {
|
||||
tftPrint(1, rds_clockold, 205, 163, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(1, rds_clock, 205, 163, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -705,15 +843,27 @@ void showRadioText() {
|
||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||
xPos = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.setTextDatum(TL_DATUM);
|
||||
if (RDSstatus) RDSSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RDSSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RDSSprite.pushSprite(36, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
xPos = 0;
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
if (CurrentSkin == 1) {
|
||||
RadiotextSprite.pushImage (-25, -188, 320, 240, mainbackground);
|
||||
RadiotextSprite.setTextDatum(TC_DATUM);
|
||||
} else {
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.setTextDatum(TL_DATUM);
|
||||
}
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(CurrentSkin == 1 ? FreqColor : RDSColor), (CurrentSkin == 1 ? FreqColorSmooth : RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (CurrentSkin == 1) {
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, 129, 2);
|
||||
RadiotextSprite.pushSprite(25, 188);
|
||||
} else {
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
}
|
||||
} else {
|
||||
if (millis() - rtticker >= 15) {
|
||||
if (xPos == 0) {
|
||||
@@ -726,6 +876,7 @@ void showRadioText() {
|
||||
rttickerhold = millis();
|
||||
}
|
||||
|
||||
RadiotextSprite.setTextDatum(TL_DATUM);
|
||||
if (xPos < -RadiotextWidth) xPos = 0;
|
||||
if (advancedRDS) {
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
@@ -734,11 +885,11 @@ void showRadioText() {
|
||||
RDSSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
RDSSprite.pushSprite(36, 220);
|
||||
} else {
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (CurrentSkin == 1) RadiotextSprite.pushImage (-25, -188, 320, 240, mainbackground); else RadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(CurrentSkin == 1 ? FreqColor : RDSColor), (CurrentSkin == 1 ? FreqColorSmooth : RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth, 2);
|
||||
RadiotextSprite.pushSprite(36, 220);
|
||||
if (CurrentSkin == 1) RadiotextSprite.pushSprite(25, 188); else RadiotextSprite.pushSprite(36, 220);
|
||||
}
|
||||
rtticker = millis();
|
||||
}
|
||||
@@ -746,12 +897,14 @@ void showRadioText() {
|
||||
}
|
||||
if (radio.rds.hasRT) {
|
||||
if (!advancedRDS) {
|
||||
if (radio.rds.rtAB) {
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, InsignificantColor);
|
||||
} else {
|
||||
tft.fillCircle(314, 223, 2, InsignificantColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
if (CurrentSkin != 1) {
|
||||
if (radio.rds.rtAB) {
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, InsignificantColor);
|
||||
} else {
|
||||
tft.fillCircle(314, 223, 2, InsignificantColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (radio.rds.rtAB) {
|
||||
|
||||
@@ -44,6 +44,7 @@ extern byte aid_counterold;
|
||||
extern byte afpagenr;
|
||||
extern byte band;
|
||||
extern byte charwidth;
|
||||
extern byte CurrentSkin;
|
||||
extern byte ECCold;
|
||||
extern byte language;
|
||||
extern byte licold;
|
||||
@@ -62,6 +63,8 @@ extern int BarSignificantColor;
|
||||
extern int BarInsignificantColor;
|
||||
extern int BWAutoColor;
|
||||
extern int BWAutoColorSmooth;
|
||||
extern int FreqColor;
|
||||
extern int FreqColorSmooth;
|
||||
extern int GreyoutColor;
|
||||
extern int InsignificantColor;
|
||||
extern int InsignificantColorSmooth;
|
||||
@@ -119,6 +122,10 @@ extern WiFiClient RemoteClient;
|
||||
extern WiFiUDP Udp;
|
||||
extern TFT_eSprite RadiotextSprite;
|
||||
extern TFT_eSprite RDSSprite;
|
||||
extern TFT_eSprite PSSprite;
|
||||
extern TFT_eSprite PISprite;
|
||||
extern TFT_eSprite PTYSprite;
|
||||
extern TFT_eSprite CTBWSignalSprite;
|
||||
|
||||
void ShowAdvancedRDS();
|
||||
void readRds();
|
||||
|
||||
Reference in New Issue
Block a user