You've already forked TEF6686_ESP32
Added RT A/B indicator
This commit is contained in:
@@ -495,9 +495,9 @@ void setup() {
|
||||
tft.setSwapBytes(true);
|
||||
tft.fillScreen(BackgroundColor);
|
||||
|
||||
sprite.createSprite(280, 19);
|
||||
sprite.createSprite(270, 19);
|
||||
sprite1.createSprite(200, 50);
|
||||
sprite2.createSprite(172, 19);
|
||||
sprite2.createSprite(162, 19);
|
||||
sprite3.createSprite(172, 19);
|
||||
sprite4.createSprite(172, 19);
|
||||
sprite5.createSprite(172, 19);
|
||||
@@ -2240,6 +2240,7 @@ void ShowFreq(int mode) {
|
||||
afstringold = "";
|
||||
rds_clockold = "";
|
||||
rdsreset = true;
|
||||
clearrds = true;
|
||||
ECCold = 254;
|
||||
licold = 254;
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
|
||||
37
src/rds.cpp
37
src/rds.cpp
@@ -596,6 +596,13 @@ void readRds() {
|
||||
tft.fillCircle(162, 41, 5, SignificantColor);
|
||||
tft.fillCircle(200, 41, 5, SignificantColor);
|
||||
}
|
||||
if (!advancedRDS) {
|
||||
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);
|
||||
}
|
||||
clearrds = false;
|
||||
}
|
||||
if (radio.rds.correctPI != 0) dropout = true;
|
||||
@@ -605,6 +612,13 @@ void readRds() {
|
||||
if (advancedRDS) tftPrint(0, PIold, 275, 75, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, PIold, 275, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(-1, PSold, 38, 75, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(-1, PSold, 38, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, PTYold, 38, 163, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (!advancedRDS) {
|
||||
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);
|
||||
}
|
||||
dropout = false;
|
||||
}
|
||||
}
|
||||
@@ -757,13 +771,13 @@ void showRadioText() {
|
||||
rttickerhold = millis();
|
||||
}
|
||||
if (advancedRDS) {
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 16)) xPos = 0;
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 10)) xPos = 0;
|
||||
sprite2.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else sprite2.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
sprite2.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
sprite2.pushSprite(35, 220);
|
||||
} else {
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 26)) xPos = 0;
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 20)) xPos = 0;
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else sprite.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
sprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
@@ -773,6 +787,25 @@ 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);
|
||||
}
|
||||
} else {
|
||||
if (radio.rds.rtAB) {
|
||||
tft.fillCircle(203, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(203, 234, 2, InsignificantColor);
|
||||
} else {
|
||||
tft.fillCircle(203, 223, 2, InsignificantColor);
|
||||
tft.fillCircle(203, 234, 2, GreyoutColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wifi) {
|
||||
if (RTold != (radio.rds.stationText + " " + radio.rds.stationText32)) {
|
||||
|
||||
Reference in New Issue
Block a user