Added clock to default screen
This commit is contained in:
@@ -948,6 +948,7 @@ void GetData() {
|
|||||||
showPTY();
|
showPTY();
|
||||||
showECC();
|
showECC();
|
||||||
showRadioText();
|
showRadioText();
|
||||||
|
if (!advancedRDS) showCT();
|
||||||
if (millis() >= tuningtimer + 200) doAF();
|
if (millis() >= tuningtimer + 200) doAF();
|
||||||
}
|
}
|
||||||
showPI();
|
showPI();
|
||||||
@@ -2134,6 +2135,7 @@ void KeyUp() {
|
|||||||
if (XDRGTKUSB || XDRGTKTCP) {
|
if (XDRGTKUSB || XDRGTKTCP) {
|
||||||
if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM));
|
if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM));
|
||||||
}
|
}
|
||||||
|
if (radio.rds.hasCT) tftPrint(1, rds_clock, 205, 163, BackgroundColor, BackgroundColor, 16);
|
||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
change = 0;
|
change = 0;
|
||||||
ShowFreq(0);
|
ShowFreq(0);
|
||||||
@@ -2180,6 +2182,7 @@ void KeyDown() {
|
|||||||
if (XDRGTKUSB || XDRGTKTCP) {
|
if (XDRGTKUSB || XDRGTKTCP) {
|
||||||
if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM));
|
if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM));
|
||||||
}
|
}
|
||||||
|
if (radio.rds.hasCT) tftPrint(1, rds_clock, 38, 109, BackgroundColor, BackgroundColor, 16);
|
||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
change = 0;
|
change = 0;
|
||||||
ShowFreq(0);
|
ShowFreq(0);
|
||||||
|
|||||||
+9
-8
@@ -350,7 +350,7 @@ void BuildAFScreen() {
|
|||||||
af_counterold = 254;
|
af_counterold = 254;
|
||||||
strcpy(radioIdPrevious, "");
|
strcpy(radioIdPrevious, "");
|
||||||
programServicePrevious = "";
|
programServicePrevious = "";
|
||||||
afmethodBold = false;
|
afmethodBold = false;
|
||||||
for (byte i = 0; i < 11; i++) eonpsold[i] = "";
|
for (byte i = 0; i < 11; i++) eonpsold[i] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -644,11 +644,10 @@ void BuildAdvancedRDS() {
|
|||||||
tft.drawCircle(71, 15, 9, SecondaryColor);
|
tft.drawCircle(71, 15, 9, SecondaryColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.rds.hasCT) tftPrint(1, rds_clockold, 205, 109, SecondaryColor, SecondaryColorSmooth, 16);
|
|
||||||
tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "TA", 21, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "TA", 21, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "AF", 42, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "AF", 42, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "-B", 60, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "-B", 60, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "CT", 78, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "CT", 78, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "TMC", 95, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "TMC", 95, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "RT+", 130, 51, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "RT+", 130, 51, GreyoutColor, BackgroundColor, 16);
|
||||||
@@ -695,6 +694,7 @@ void BuildAdvancedRDS() {
|
|||||||
afstringold = "";
|
afstringold = "";
|
||||||
rtplusstringold = "";
|
rtplusstringold = "";
|
||||||
afmethodBold = false;
|
afmethodBold = false;
|
||||||
|
rds_clockold = "";
|
||||||
ShowMemoryPos();
|
ShowMemoryPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -813,6 +813,7 @@ void BuildDisplay() {
|
|||||||
batteryold = 6;
|
batteryold = 6;
|
||||||
batteryVold = 0;
|
batteryVold = 0;
|
||||||
vPerold = 0;
|
vPerold = 0;
|
||||||
|
rds_clockold = "";
|
||||||
strcpy(programTypePrevious, "");
|
strcpy(programTypePrevious, "");
|
||||||
strcpy(radioIdPrevious, "");
|
strcpy(radioIdPrevious, "");
|
||||||
programServicePrevious = "";
|
programServicePrevious = "";
|
||||||
@@ -1935,11 +1936,11 @@ void DoMenu() {
|
|||||||
tftPrint(1, "NoobishSVK", 145, 143, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, "NoobishSVK", 145, 143, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(-1, "yo2ldk", 155, 128, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(-1, "yo2ldk", 155, 128, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(-1, "Justin_Peng(Portable)", 155, 143, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(-1, "Justin_Peng(Portable)", 155, 143, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(1, "mx4zxc", 145, 158, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, "mx4zxc", 145, 158, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(-1, "elektronik232", 155, 158, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(-1, "elektronik232", 155, 158, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(1, "KOTYA8", 145, 173, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, "KOTYA8", 145, 173, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(-1, "mrwish7", 155, 173, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(-1, "mrwish7", 155, 173, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(1, "lxsxl", 145, 188, PrimaryColor, PrimaryColorSmooth, 16);
|
tftPrint(1, "lxsxl", 145, 188, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
tftPrint(0, "github.com/PE5PVB/TEF6686_ESP32", 155, 208, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "github.com/PE5PVB/TEF6686_ESP32", 155, 208, ActiveColor, ActiveColorSmooth, 16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -725,6 +725,21 @@ void showPS() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showCT() {
|
||||||
|
if (!screenmute && !afscreen && !advancedRDS) {
|
||||||
|
rds_clock = ((radio.rds.hour < 10 ? "0" : "") + String(radio.rds.hour) + ":" + (radio.rds.minute < 10 ? "0" : "") + String(radio.rds.minute));
|
||||||
|
if (rds_clock != rds_clockold) {
|
||||||
|
if (radio.rds.hasCT) {
|
||||||
|
tftReplace(1, rds_clockold, rds_clock, 205, 163, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
|
Serial.println(rds_clock);
|
||||||
|
} else {
|
||||||
|
tftPrint(1, rds_clock, 205, 163, BackgroundColor, BackgroundColor, 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rds_clockold = rds_clock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void showRadioText() {
|
void showRadioText() {
|
||||||
if (radio.rds.hasRT && radio.rds.stationText.length() > 0) {
|
if (radio.rds.hasRT && radio.rds.stationText.length() > 0) {
|
||||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ void showPTY();
|
|||||||
void showPS();
|
void showPS();
|
||||||
void showRadioText();
|
void showRadioText();
|
||||||
void ShowAFEON();
|
void ShowAFEON();
|
||||||
|
void showCT();
|
||||||
|
|
||||||
extern void ShowRDSLogo(bool RDSstatus);
|
extern void ShowRDSLogo(bool RDSstatus);
|
||||||
extern void DataPrint(String string);
|
extern void DataPrint(String string);
|
||||||
|
|||||||
Reference in New Issue
Block a user