You've already forked TEF6686_ESP32
Disable radiotext to display processing on screenmute
This commit is contained in:
130
src/rds.cpp
130
src/rds.cpp
@@ -289,7 +289,7 @@ void showECC() {
|
|||||||
|
|
||||||
void readRds() {
|
void readRds() {
|
||||||
if (band < BAND_GAP) {
|
if (band < BAND_GAP) {
|
||||||
radio.readRDS(showrdserrors);
|
radio.readRDS(showrdserrors);
|
||||||
RDSstatus = radio.rds.hasRDS;
|
RDSstatus = radio.rds.hasRDS;
|
||||||
ShowRDSLogo(RDSstatus);
|
ShowRDSLogo(RDSstatus);
|
||||||
if (!screenmute && !afscreen) {
|
if (!screenmute && !afscreen) {
|
||||||
@@ -429,9 +429,9 @@ void readRds() {
|
|||||||
|
|
||||||
if (piState != RdsPiBuffer::STATE_INVALID) {
|
if (piState != RdsPiBuffer::STATE_INVALID) {
|
||||||
DataPrint ("P");
|
DataPrint ("P");
|
||||||
String PIcodeToSend;
|
String PIcodeToSend;
|
||||||
PIcodeToSend = String(((radio.rds.rdsA >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsA >> 8) & 0xF, HEX) + String(((radio.rds.rdsA) >> 4) & 0xF, HEX) + String((radio.rds.rdsA) & 0xF, HEX);
|
PIcodeToSend = String(((radio.rds.rdsA >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsA >> 8) & 0xF, HEX) + String(((radio.rds.rdsA) >> 4) & 0xF, HEX) + String((radio.rds.rdsA) & 0xF, HEX);
|
||||||
PIcodeToSend.toUpperCase();
|
PIcodeToSend.toUpperCase();
|
||||||
DataPrint (PIcodeToSend);
|
DataPrint (PIcodeToSend);
|
||||||
while (piState != 0) {
|
while (piState != 0) {
|
||||||
DataPrint("?");
|
DataPrint("?");
|
||||||
@@ -440,7 +440,7 @@ void readRds() {
|
|||||||
DataPrint ("\n");
|
DataPrint ("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
XDRGTKRDS.toUpperCase();
|
XDRGTKRDS.toUpperCase();
|
||||||
DataPrint(XDRGTKRDS);
|
DataPrint(XDRGTKRDS);
|
||||||
XDRGTKRDSold = XDRGTKRDS;
|
XDRGTKRDSold = XDRGTKRDS;
|
||||||
}
|
}
|
||||||
@@ -607,75 +607,78 @@ void showCT() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showRadioText() {
|
void showRadioText() {
|
||||||
if (radio.rds.hasRT && radio.rds.stationText.length() > 0) {
|
if (!screenmute) {
|
||||||
if (String(radio.rds.stationText + radio.rds.stationText32).length() != Radiotextlengthold) {
|
if (radio.rds.hasRT && radio.rds.stationText.length() > 0) {
|
||||||
RadiotextWidth = tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + TickerSpace;
|
if (String(radio.rds.stationText + radio.rds.stationText32).length() != Radiotextlengthold) {
|
||||||
Radiotextlengthold = String(radio.rds.stationText + radio.rds.stationText32).length();
|
RadiotextWidth = tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + TickerSpace;
|
||||||
}
|
Radiotextlengthold = String(radio.rds.stationText + radio.rds.stationText32).length();
|
||||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
}
|
||||||
xPos = 0;
|
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||||
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
xPos = 0;
|
||||||
if (RDSstatus) AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
||||||
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
if (RDSstatus) AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||||
AdvRadiotextSprite.pushSprite(35, 220);
|
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
AdvRadiotextSprite.pushSprite(35, 220);
|
||||||
xPos = 0;
|
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||||
RadiotextSprite.fillSprite(BackgroundColor);
|
xPos = 0;
|
||||||
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
RadiotextSprite.fillSprite(BackgroundColor);
|
||||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||||
RadiotextSprite.pushSprite(38, 220);
|
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||||
} else {
|
RadiotextSprite.pushSprite(38, 220);
|
||||||
if (millis() - rtticker >= 15) {
|
} else {
|
||||||
if (xPos == 0) {
|
if (millis() - rtticker >= 15) {
|
||||||
if (millis() - rttickerhold >= 1000) {
|
if (xPos == 0) {
|
||||||
|
if (millis() - rttickerhold >= 1000) {
|
||||||
|
xPos --;
|
||||||
|
rttickerhold = millis();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
xPos --;
|
xPos --;
|
||||||
rttickerhold = millis();
|
rttickerhold = millis();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
xPos --;
|
|
||||||
rttickerhold = millis();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xPos < -(RadiotextWidth + TickerSpace)) xPos = 0;
|
if (xPos < -(RadiotextWidth + TickerSpace)) xPos = 0;
|
||||||
if (advancedRDS) {
|
if (advancedRDS) {
|
||||||
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
||||||
if (RDSstatus) AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
if (RDSstatus) AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||||
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||||
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth + TickerSpace, 2);
|
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth + TickerSpace, 2);
|
||||||
AdvRadiotextSprite.pushSprite(35, 220);
|
AdvRadiotextSprite.pushSprite(35, 220);
|
||||||
} else {
|
} else {
|
||||||
RadiotextSprite.fillSprite(BackgroundColor);
|
RadiotextSprite.fillSprite(BackgroundColor);
|
||||||
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, 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, 2);
|
||||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth + TickerSpace, 2);
|
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos + RadiotextWidth + TickerSpace, 2);
|
||||||
RadiotextSprite.pushSprite(38, 220);
|
RadiotextSprite.pushSprite(38, 220);
|
||||||
|
}
|
||||||
|
rtticker = millis();
|
||||||
}
|
}
|
||||||
rtticker = millis();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (radio.rds.hasRT) {
|
||||||
if (radio.rds.hasRT) {
|
if (!advancedRDS) {
|
||||||
if (!advancedRDS) {
|
if (radio.rds.rtAB) {
|
||||||
if (radio.rds.rtAB) {
|
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
tft.fillCircle(314, 234, 2, InsignificantColor);
|
||||||
tft.fillCircle(314, 234, 2, InsignificantColor);
|
} else {
|
||||||
|
tft.fillCircle(314, 223, 2, InsignificantColor);
|
||||||
|
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
tft.fillCircle(314, 223, 2, InsignificantColor);
|
if (radio.rds.rtAB) {
|
||||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
tft.fillCircle(203, 223, 2, GreyoutColor);
|
||||||
}
|
tft.fillCircle(203, 234, 2, InsignificantColor);
|
||||||
} else {
|
} else {
|
||||||
if (radio.rds.rtAB) {
|
tft.fillCircle(203, 223, 2, InsignificantColor);
|
||||||
tft.fillCircle(203, 223, 2, GreyoutColor);
|
tft.fillCircle(203, 234, 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)) {
|
||||||
if (RTold != (radio.rds.stationText + " " + radio.rds.stationText32)) {
|
xPos = 0;
|
||||||
|
if (wifi) {
|
||||||
Udp.beginPacket(remoteip, 9030);
|
Udp.beginPacket(remoteip, 9030);
|
||||||
Udp.print("from=TEF_tuner " + String(stationlistid, DEC) + ";RT1=");
|
Udp.print("from=TEF_tuner " + String(stationlistid, DEC) + ";RT1=");
|
||||||
char RThex[65];
|
char RThex[65];
|
||||||
@@ -688,9 +691,8 @@ void showRadioText() {
|
|||||||
}
|
}
|
||||||
Udp.endPacket();
|
Udp.endPacket();
|
||||||
}
|
}
|
||||||
|
RTold = radio.rds.stationText + " " + radio.rds.stationText32;
|
||||||
}
|
}
|
||||||
if (RTold != (radio.rds.stationText + " " + radio.rds.stationText32)) xPos = 0;
|
|
||||||
RTold = radio.rds.stationText + " " + radio.rds.stationText32;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowAFEON() {
|
void ShowAFEON() {
|
||||||
|
|||||||
Reference in New Issue
Block a user