You've already forked TEF6686_ESP32
Converted text offset value to a define to make it easier to read and use
This commit is contained in:
@@ -554,14 +554,14 @@ void XDRGTKRoutine() {
|
||||
if (autosquelch) {
|
||||
DataPrint("H1\n");
|
||||
if (!screenmute) {
|
||||
tftPrint(-1, "SQ:", 212, 145, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "SQ:", 212, 145, ActiveColor, ActiveColorSmooth, 16);
|
||||
showAutoSquelch(1);
|
||||
}
|
||||
} else {
|
||||
DataPrint("H0\n");
|
||||
if (!screenmute) {
|
||||
if (!usesquelch) {
|
||||
tftPrint(-1, "SQ:", 212, 145, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "SQ:", 212, 145, BackgroundColor, BackgroundColor, 16);
|
||||
showAutoSquelch(0);
|
||||
} else {
|
||||
Squelch = -150;
|
||||
@@ -804,7 +804,7 @@ void XDRGTKRoutine() {
|
||||
if (!screenmute) {
|
||||
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor);
|
||||
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor);
|
||||
tftPrint(0, textUI(34), 160, 100, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, textUI(34), 160, 100, ActiveColor, ActiveColorSmooth, 28);
|
||||
}
|
||||
|
||||
DataPrint("U");
|
||||
@@ -985,9 +985,9 @@ void tryWiFi() {
|
||||
webserver.begin();
|
||||
NTPupdate();
|
||||
remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
|
||||
if (!setupmode) tftPrint(0, textUI(57), 155, 128, InsignificantColor, InsignificantColorSmooth, 28);
|
||||
if (!setupmode) tftPrint(ACENTER, textUI(57), 155, 128, InsignificantColor, InsignificantColorSmooth, 28);
|
||||
} else {
|
||||
if (!setupmode) tftPrint(0, textUI(56), 155, 128, SignificantColor, SignificantColorSmooth, 28);
|
||||
if (!setupmode) tftPrint(ACENTER, textUI(56), 155, 128, SignificantColor, SignificantColorSmooth, 28);
|
||||
Server.end();
|
||||
webserver.stop();
|
||||
Udp.stop();
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
|
||||
#define VERSION "v2.20.4"
|
||||
|
||||
#define ON 1
|
||||
#define OFF 0
|
||||
#define REVERSE false
|
||||
#define ON 1
|
||||
#define OFF 0
|
||||
#define REVERSE false
|
||||
|
||||
#define ALEFT -1
|
||||
#define ACENTER 0
|
||||
#define ARIGHT 1
|
||||
|
||||
#define MAX(x, y) ((x) < (y) ? (y) : (x))
|
||||
#define MIN(X, Y) ({\
|
||||
@@ -649,31 +653,31 @@ static const uint8_t WiFi2[] PROGMEM = {
|
||||
};
|
||||
|
||||
static const uint8_t WiFi3[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x80, 0x00,
|
||||
0x00, 0x3f, 0xf0, 0x00,
|
||||
0x00, 0x7f, 0xfc, 0x00,
|
||||
0x01, 0xff, 0xfe, 0x00,
|
||||
0x03, 0xff, 0xff, 0x00,
|
||||
0x03, 0xff, 0xff, 0x80,
|
||||
0x07, 0xff, 0xff, 0x80,
|
||||
0x0f, 0xff, 0xff, 0xc0,
|
||||
0x0f, 0xff, 0xff, 0xc0,
|
||||
0x07, 0xff, 0xff, 0x80,
|
||||
0x03, 0xff, 0xff, 0x00,
|
||||
0x01, 0xff, 0xfe, 0x00,
|
||||
0x00, 0xff, 0xfc, 0x00,
|
||||
0x00, 0x7f, 0xf8, 0x00,
|
||||
0x00, 0x3f, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x0f, 0x80, 0x00,
|
||||
0x00, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x80, 0x00,
|
||||
0x00, 0x3f, 0xf0, 0x00,
|
||||
0x00, 0x7f, 0xfc, 0x00,
|
||||
0x01, 0xff, 0xfe, 0x00,
|
||||
0x03, 0xff, 0xff, 0x00,
|
||||
0x03, 0xff, 0xff, 0x80,
|
||||
0x07, 0xff, 0xff, 0x80,
|
||||
0x0f, 0xff, 0xff, 0xc0,
|
||||
0x0f, 0xff, 0xff, 0xc0,
|
||||
0x07, 0xff, 0xff, 0x80,
|
||||
0x03, 0xff, 0xff, 0x00,
|
||||
0x01, 0xff, 0xfe, 0x00,
|
||||
0x00, 0xff, 0xfc, 0x00,
|
||||
0x00, 0x7f, 0xf8, 0x00,
|
||||
0x00, 0x3f, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x0f, 0x80, 0x00,
|
||||
0x00, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const uint8_t WiFi4[] PROGMEM = {
|
||||
|
||||
250
src/gui.cpp
250
src/gui.cpp
@@ -502,15 +502,15 @@ void BuildRDSStatScreen() {
|
||||
tft.drawLine(240, 50, 240, 218, FrameColor);
|
||||
|
||||
// --- Column headers ---
|
||||
tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ALEFT, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
|
||||
// --- Labels above packet columns ---
|
||||
tftPrint(-1, "ERRORS", 3, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "A:", 66, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "B:", 104, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "C:", 142, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "D:", 180, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "BER", 250, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "ERRORS", 3, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "A:", 66, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "B:", 104, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "C:", 142, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "D:", 180, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "BER", 250, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
// --- Group labels setup ---
|
||||
const uint16_t xcol[4] = {10, 90, 170, 250}; // column X positions
|
||||
@@ -528,8 +528,8 @@ void BuildRDSStatScreen() {
|
||||
for (uint8_t col = 0; col < 4; col++) { // 4 columns
|
||||
for (uint8_t row = 0; row < 4; row++) { // 4 groups per column
|
||||
uint8_t g = col * 4 + row; // group index 0..15
|
||||
tftPrint(-1, groups[g][0], xcol[col], rowY[row * 2], ActiveColor, ActiveColorSmooth, 16); // A
|
||||
tftPrint(-1, groups[g][1], xcol[col], rowY[row * 2 + 1], ActiveColor, ActiveColorSmooth, 16); // B
|
||||
tftPrint(ALEFT, groups[g][0], xcol[col], rowY[row * 2], ActiveColor, ActiveColorSmooth, 16); // A
|
||||
tftPrint(ALEFT, groups[g][1], xcol[col], rowY[row * 2 + 1], ActiveColor, ActiveColorSmooth, 16); // B
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,8 +537,8 @@ void BuildRDSStatScreen() {
|
||||
const uint16_t pctX[4] = {70, 150, 230, 310};
|
||||
for (uint8_t c = 0; c < 4; c++) {
|
||||
for (uint8_t y = 56; y < 216; y += 20) {
|
||||
tftPrint(1, "0.0", pctX[c] - 10, y, GreyoutColor, BackgroundColor, 16); // placeholder value
|
||||
tftPrint(0, "%", pctX[c], y, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ARIGHT, "0.0", pctX[c] - 10, y, GreyoutColor, BackgroundColor, 16); // placeholder value
|
||||
tftPrint(ACENTER, "%", pctX[c], y, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ void BuildAFScreen() {
|
||||
if (!afscreen && RDSstatus) {
|
||||
tft.drawRoundRect(20, 30, 274, 170, 5, ActiveColor);
|
||||
tft.fillRoundRect(22, 32, 270, 166, 5, BackgroundColor);
|
||||
tftPrint(0, textUI(34), 155, 98, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, textUI(34), 155, 98, ActiveColor, ActiveColorSmooth, 28);
|
||||
radio.TestAFEON();
|
||||
}
|
||||
afscreen = true;
|
||||
@@ -585,12 +585,12 @@ void BuildAFScreen() {
|
||||
tft.drawLine(105, 30, 105, 0, FrameColor);
|
||||
tft.drawLine(162, 30, 162, 0, FrameColor);
|
||||
tft.drawLine(248, 30, 248, 0, FrameColor);
|
||||
tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, textUI(33), 160, 222, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, textUI(33), 160, 222, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (afpagenr == 1) {
|
||||
if (!radio.rds.hasAF) tftPrint(-1, textUI(87), 6, 48, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (!radio.rds.hasAF) tftPrint(ALEFT, textUI(87), 6, 48, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
} else if (afpagenr == 2) {
|
||||
if (!radio.rds.hasEON) tftPrint(-1, textUI(88), 6, 48, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (!radio.rds.hasEON) tftPrint(ALEFT, textUI(88), 6, 48, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
}
|
||||
RDSstatusold = !RDSstatusold;
|
||||
ShowFreq(0);
|
||||
@@ -625,7 +625,7 @@ void BuildAFScreen() {
|
||||
}
|
||||
for (byte i = 0; i < 20; i++) std::memset(eonpicodeold[i], '\0', sizeof(eonpicodeold[i]));
|
||||
|
||||
if (afpagenr == 1 && radio.rds.hasDABAF && radio.rds.dabaffreq != 0) tftPrint(1, "DAB: " + String(radio.rds.dabafchannel) + " (" + String(radio.rds.dabafeid) + ")", 166, 32, SecondaryColor, SecondaryColorSmooth, 16);
|
||||
if (afpagenr == 1 && radio.rds.hasDABAF && radio.rds.dabaffreq != 0) tftPrint(ARIGHT, "DAB: " + String(radio.rds.dabafchannel) + " (" + String(radio.rds.dabafeid) + ")", 166, 32, SecondaryColor, SecondaryColorSmooth, 16);
|
||||
|
||||
}
|
||||
|
||||
@@ -2870,7 +2870,7 @@ void BuildBWSelector() {
|
||||
case 7: tft.pushImage (0, 0, 320, 240, configurationbackground_wo); break;
|
||||
default: tft.pushImage (0, 0, 320, 240, configurationbackground); break;
|
||||
}
|
||||
tftPrint(0, textUI(285), 160, 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(285), 160, 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
showBWSelector();
|
||||
}
|
||||
|
||||
@@ -2898,10 +2898,10 @@ void BuildMenu() {
|
||||
}
|
||||
|
||||
if (!submenu) {
|
||||
tftPrint(0, textUI(32), 160, 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(32), 160, 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(-1, textUI(184), (hardwaremodel == PORTABLE_TOUCH_ILI9341 ? 20 : 8), 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, textUI(189 + menupage - 1), 312, 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, textUI(184), (hardwaremodel == PORTABLE_TOUCH_ILI9341 ? 20 : 8), 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, textUI(189 + menupage - 1), 312, 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
|
||||
if (hardwaremodel == PORTABLE_TOUCH_ILI9341) {
|
||||
@@ -2961,33 +2961,33 @@ void BuildAdvancedRDS() {
|
||||
tft.drawLine(210, 191, 320, 191, FrameColor);
|
||||
tft.drawLine(248, 30, 248, 0, FrameColor);
|
||||
|
||||
tftPrint(-1, "ERRORS", 3, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "MHz", 310, 35, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, unitString[unit], 310, 51, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "ERRORS", 3, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "MHz", 310, 35, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, unitString[unit], 310, 51, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (radio.rds.region == 0) {
|
||||
tftPrint(-1, "PI", 216, 81, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "PI", 216, 81, ActiveColor, ActiveColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(-1, "PI:", 216, 72, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "ID:", 216, 89, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "PI:", 216, 72, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "ID:", 216, 89, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
tftPrint(-1, "PS", 3, 81, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "PTY", 3, 109, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "RT+", 3, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "AF", 3, 199, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "EON", 3, 174, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "RT", 3, 222, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "PS", 3, 81, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "PTY", 3, 109, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "RT+", 3, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "AF", 3, 199, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "EON", 3, 174, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "RT", 3, 222, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
tftPrint(-1, "A:", 66, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "B:", 104, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "C:", 142, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "D:", 180, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "ECC", 214, 193, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "LIC", 214, 208, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "PIN", 214, 223, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "Dynamic PTY", 300, 130, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "Artificial head", 300, 145, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "Compressed", 300, 160, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "Has stereo", 300, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "A:", 66, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "B:", 104, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "C:", 142, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "D:", 180, 34, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "ECC", 214, 193, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "LIC", 214, 208, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "PIN", 214, 223, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "Dynamic PTY", 300, 130, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "Artificial head", 300, 145, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "Compressed", 300, 160, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "Has stereo", 300, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
tft.fillCircle(86, 41, 5, SignificantColor);
|
||||
tft.fillCircle(124, 41, 5, SignificantColor);
|
||||
@@ -3001,7 +3001,7 @@ void BuildAdvancedRDS() {
|
||||
|
||||
for (int i = 0; i < 33; i++) tft.fillCircle((6 * i) + 10, 133, 2, GreyoutColor);
|
||||
|
||||
tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ALEFT, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
|
||||
tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawBitmap(249, 4, Speaker, 28, 24, GreyoutColor);
|
||||
@@ -3012,15 +3012,15 @@ void BuildAdvancedRDS() {
|
||||
tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor);
|
||||
}
|
||||
|
||||
tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
|
||||
RDSstatusold = !RDSstatusold;
|
||||
ShowFreq(0);
|
||||
@@ -3106,41 +3106,41 @@ void BuildDisplay() {
|
||||
}
|
||||
}
|
||||
|
||||
if (usesquelch || autosquelch) tftPrint(-1, "SQ:", 197, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "US:", 259, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "MP:", 259, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "CN:", 197, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "dB", 255, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "%", 316, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "%", 316, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (usesquelch || autosquelch) tftPrint(ALEFT, "SQ:", 197, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "US:", 259, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "MP:", 259, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "CN:", 197, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "dB", 255, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "%", 316, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "%", 316, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
tftPrint(0, "S", 7, 101, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "1", 21, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "3", 41, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "5", 61, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "7", 81, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "9", 101, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "+10", 127, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "+30", 160, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, "S", 7, 101, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "1", 21, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "3", 41, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "5", 61, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "7", 81, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "9", 101, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "+10", 127, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "+30", 160, 115, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (!showmodulation) {
|
||||
tftPrint(0, "A", 7, 128, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "10", 24, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "30", 54, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "50", 84, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "70", 114, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "100", 160, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ACENTER, "A", 7, 128, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "10", 24, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "30", 54, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "50", 84, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "70", 114, 144, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "100", 160, 144, GreyoutColor, BackgroundColor, 16);
|
||||
} else {
|
||||
tftPrint(0, "A", 7, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "10", 24, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "30", 54, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "50", 84, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, "70", 114, 144, ActiveColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "100", 160, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, "A", 7, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "10", 24, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "30", 54, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "50", 84, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "70", 114, 144, ActiveColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "100", 160, 144, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
|
||||
tftPrint(1, "kHz", 246, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(1, unitString[unit], 316, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "kHz", 246, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ARIGHT, unitString[unit], 316, 128, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawBitmap(249, 4, Speaker, 28, 24, GreyoutColor);
|
||||
@@ -4532,11 +4532,11 @@ void showMenuOpenTouchButtons() {
|
||||
if (!submenu && menuoption == ITEM9) {
|
||||
tft.fillRoundRect(240, 36, 60, 40, 6, FrameColor);
|
||||
tft.drawRoundRect(240, 36, 60, 40, 6, ActiveColor);
|
||||
tftPrint(0, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
} else {
|
||||
tft.fillRoundRect(130, 154, 60, 40, 6, FrameColor);
|
||||
tft.drawRoundRect(130, 154, 60, 40, 6, ActiveColor);
|
||||
tftPrint(0, "OK", 160, 162, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "OK", 160, 162, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4556,7 +4556,7 @@ void DoMenu() {
|
||||
case 7: tft.pushImage (0, 0, 320, 240, configurationbackground_wo); break;
|
||||
default: tft.pushImage (0, 0, 320, 240, configurationbackground); break;
|
||||
}
|
||||
tftPrint(0, textUI(189 + menupage - 1), 160, 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(189 + menupage - 1), 160, 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4647,31 +4647,31 @@ void DoMenu() {
|
||||
menuopen = true;
|
||||
tft.drawRoundRect(10, 6, 300, 230, 5, ActiveColor);
|
||||
tft.fillRoundRect(12, 8, 296, 226, 5, BackgroundColor);
|
||||
tftPrint(0, textUI(71), 155, 13, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, textUI(72), 155, 55, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, "PE5PVB", 155, 38, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "ohmytime", 145, 80, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "HyperDX", 145, 95, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "MCelliotG", 155, 80, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "andimik", 155, 95, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "DXHR05", 145, 110, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "NoobishSVK", 145, 125, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "yo2ldk", 155, 110, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "Justin_Peng(Portable)", 155, 125, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "Overland DX", 145, 140, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "elektronik232", 155, 140, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "KOTYA8", 145, 155, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "mrwish7", 155, 155, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "lxsxl", 145, 170, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "leryfm", 155, 170, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "marsel90-1", 145, 185, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "lawendel", 155, 185, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, "KB8U", 145, 200, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(0, "github.com/PE5PVB/TEF6686_ESP32", 155, 215, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(71), 155, 13, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, textUI(72), 155, 55, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "PE5PVB", 155, 38, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "ohmytime", 145, 80, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "HyperDX", 145, 95, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "MCelliotG", 155, 80, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "andimik", 155, 95, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "DXHR05", 145, 110, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "NoobishSVK", 145, 125, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "yo2ldk", 155, 110, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "Justin_Peng(Portable)", 155, 125, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "Overland DX", 145, 140, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "elektronik232", 155, 140, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "KOTYA8", 145, 155, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "mrwish7", 155, 155, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "lxsxl", 145, 170, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "leryfm", 155, 170, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "marsel90-1", 145, 185, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ALEFT, "lawendel", 155, 185, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "KB8U", 145, 200, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ACENTER, "github.com/PE5PVB/TEF6686_ESP32", 155, 215, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (hardwaremodel == PORTABLE_TOUCH_ILI9341) {
|
||||
tft.fillRoundRect(240, 36, 60, 40, 6, FrameColor);
|
||||
tft.drawRoundRect(240, 36, 60, 40, 6, ActiveColor);
|
||||
tftPrint(0, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -5329,10 +5329,10 @@ void DoMenu() {
|
||||
break;
|
||||
|
||||
case ITEM3: {
|
||||
tftPrint(0, textUI(53), 155, 58, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, "ESP_" + String(ESP_getChipId()), 155, 98, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
tftPrint(0, textUI(54), 155, 138, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, "http://192.168.4.1", 155, 174, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(53), 155, 58, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "ESP_" + String(ESP_getChipId()), 155, 98, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
tftPrint(ACENTER, textUI(54), 155, 138, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "http://192.168.4.1", 155, 174, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
char key [9];
|
||||
XDRGTK_key.toCharArray(key, 9);
|
||||
char rabbitearsuser [9];
|
||||
@@ -5532,7 +5532,7 @@ void DoMenu() {
|
||||
if (hardwaremodel == PORTABLE_TOUCH_ILI9341) {
|
||||
tft.fillRoundRect(130, 154, 60, 40, 6, FrameColor);
|
||||
tft.drawRoundRect(130, 154, 60, 40, 6, ActiveColor);
|
||||
tftPrint(0, "OK", 160, 162, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "OK", 160, 162, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -5544,21 +5544,21 @@ void DoMenu() {
|
||||
Infoboxprint(textUI(270));
|
||||
switch (doAutoMemory(memstartfreq, memstopfreq, memstartpos, memstoppos, mempionly, memdoublepi)) {
|
||||
case 0:
|
||||
tftPrint(0, textUI(275), 160, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(275), 160, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
tftPrint(0, textUI(273), 160, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(273), 160, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
tftPrint(0, textUI(274), 160, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, textUI(274), 160, 175, ActiveColor, ActiveColorSmooth, 16);
|
||||
break;
|
||||
}
|
||||
if (hardwaremodel == PORTABLE_TOUCH_ILI9341) {
|
||||
tft.fillRoundRect(240, 36, 60, 40, 6, FrameColor);
|
||||
tft.drawRoundRect(240, 36, 60, 40, 6, ActiveColor);
|
||||
tftPrint(0, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -5641,7 +5641,7 @@ void DoMenu() {
|
||||
if (hardwaremodel == PORTABLE_TOUCH_ILI9341) {
|
||||
tft.fillRoundRect(240, 36, 60, 40, 6, FrameColor);
|
||||
tft.drawRoundRect(240, 36, 60, 40, 6, ActiveColor);
|
||||
tftPrint(0, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, "OK", 270, 44, (CurrentTheme == 7 ? White : ActiveColor), ActiveColorSmooth, 28);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -5683,11 +5683,11 @@ void Infoboxprint(const char* input) {
|
||||
char* line2 = (char*)malloc((length - newlineIndex) * sizeof(char));
|
||||
strcpy(line2, input + newlineIndex + 1);
|
||||
if (menu) {
|
||||
tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, line2, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, line2, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||
} else if (setupmode) {
|
||||
tftPrint(0, line1, 155, 40, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, line2, 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, line1, 155, 40, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, line2, 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
||||
} else {
|
||||
FrequencySprite.drawString(line1, 100, 5);
|
||||
FrequencySprite.drawString(line2, 100, 25);
|
||||
@@ -5696,9 +5696,9 @@ void Infoboxprint(const char* input) {
|
||||
free(line2);
|
||||
} else {
|
||||
if (menu) {
|
||||
tftPrint(0, input, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, input, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||
} else if (setupmode) {
|
||||
tftPrint(0, input, 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(ACENTER, input, 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
||||
} else {
|
||||
FrequencySprite.drawString(input, 100, 15);
|
||||
}
|
||||
@@ -5758,7 +5758,7 @@ void drawButton(const char* text, byte button_number, bool active, bool selected
|
||||
if (button_number != 19) tft.fillRect(lineX, lineY, lineWidth, lineHeight, (active ? InsignificantColor : GreyoutColor));
|
||||
|
||||
// Draw the button text
|
||||
tftPrint(0, text, x + buttonWidth / 2, y + (buttonHeight / 4) - 2, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, text, x + buttonWidth / 2, y + (buttonHeight / 4) - 2, ActiveColor, ActiveColorSmooth, 16);
|
||||
}
|
||||
|
||||
String shortLine(String text) {
|
||||
|
||||
202
src/rds.cpp
202
src/rds.cpp
@@ -42,11 +42,11 @@ void ShowAdvancedRDS() {
|
||||
if (ptynold != radio.rds.PTYN || rdsreset) {
|
||||
if (!screenmute) {
|
||||
if (ptynold != "PTYN N/A" || radio.rds.hasPTYN) {
|
||||
tftPrint(-1, "PTYN N/A", 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, ptynold, 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "PTYN N/A", 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, ptynold, 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
if (!radio.rds.hasPTYN) radio.rds.PTYN = "PTYN N/A";
|
||||
tftPrint(-1, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ALEFT, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth, 16);
|
||||
ptynold = radio.rds.PTYN;
|
||||
}
|
||||
}
|
||||
@@ -55,10 +55,10 @@ void ShowAdvancedRDS() {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasLIC) LICString = (radio.rds.LICtext.length() == 0 ? textUI(73) : radio.rds.LICtext); else LICString = "N/A";
|
||||
if (LICString != LIColdString) {
|
||||
tftPrint(-1, "N/A", 242, 208, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, LIColdString, 242, 208, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "N/A", 242, 208, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, LIColdString, 242, 208, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, LICString, 242, 208, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ALEFT, LICString, 242, 208, RDSColor, RDSColorSmooth, 16);
|
||||
LIColdString = LICString;
|
||||
licold = radio.rds.LIC;
|
||||
}
|
||||
@@ -67,10 +67,10 @@ void ShowAdvancedRDS() {
|
||||
String pinstring = String(radio.rds.pinDay) + " " + String(radio.rds.pinHour) + ":" + (radio.rds.pinMin < 10 ? "0" : "") + String(radio.rds.pinMin);
|
||||
if (pinstringold != pinstring) {
|
||||
if (!screenmute) {
|
||||
tftPrint(-1, "N/A", 242, 223, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, pinstringold, 242, 223, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "N/A", 242, 223, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, pinstringold, 242, 223, BackgroundColor, BackgroundColor, 16);
|
||||
|
||||
if (radio.rds.hasPIN) tftPrint(-1, pinstring, 242, 223, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "N/A", 242, 223, RDSColor, RDSColorSmooth, 16);
|
||||
if (radio.rds.hasPIN) tftPrint(ALEFT, pinstring, 242, 223, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "N/A", 242, 223, RDSColor, RDSColorSmooth, 16);
|
||||
pinstringold = pinstring;
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void ShowAdvancedRDS() {
|
||||
if (radio.rds.hasAF && radio.af_counter > 0) for (byte i = 0; i < radio.af_counter; i++) afstring += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (i == radio.af_counter - 1 ? " " : " | "); else afstring = textUI(87);
|
||||
if (hasafold != radio.rds.hasAF) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasAF) tftPrint(ALEFT, "AF", 50, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
hasafold = radio.rds.hasAF;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void ShowAdvancedRDS() {
|
||||
if (radio.eon_counter > 0) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? " " : " | "); else eonstring = textUI(88);
|
||||
if (haseonold != radio.rds.hasEON) {
|
||||
if (!screenmute) {
|
||||
if (radio.eon_counter > 0) tftPrint(-1, "EON", 153, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.eon_counter > 0) tftPrint(ALEFT, "EON", 153, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
haseonold = radio.rds.hasEON;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ void ShowAdvancedRDS() {
|
||||
if (radio.rds.hasRDSplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : "") + " "; else rtplusstring = textUI(89);
|
||||
if (hasrtplusold != radio.rds.hasRDSplus) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 123, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasRDSplus) tftPrint(ALEFT, "RT+", 123, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
hasrtplusold = radio.rds.hasRDSplus;
|
||||
}
|
||||
@@ -200,21 +200,21 @@ void ShowAdvancedRDS() {
|
||||
|
||||
if (TPold != radio.rds.hasTP) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasTP) tftPrint(-1, "TP", 2, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasTP) tftPrint(ALEFT, "TP", 2, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
TPold = radio.rds.hasTP;
|
||||
}
|
||||
|
||||
if (TAold != radio.rds.hasTA) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasTA) tftPrint(-1, "TA", 24, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasTA) tftPrint(ALEFT, "TA", 24, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
TAold = radio.rds.hasTA;
|
||||
}
|
||||
|
||||
if (afmethodBold != radio.afmethodB || rdsreset) {
|
||||
if (!screenmute) {
|
||||
if (radio.afmethodB) tftPrint(-1, "-B", 68, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.afmethodB) tftPrint(ALEFT, "-B", 68, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
afmethodBold = radio.afmethodB;
|
||||
}
|
||||
@@ -223,18 +223,18 @@ void ShowAdvancedRDS() {
|
||||
if (!screenmute) {
|
||||
switch (radio.rds.MS) {
|
||||
case 0:
|
||||
tftPrint(-1, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
tftPrint(-1, "M", 196, 51, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "M", 196, 51, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ALEFT, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
tftPrint(-1, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "S", 185, 51, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ALEFT, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "S", 185, 51, RDSColor, RDSColorSmooth, 16);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -249,7 +249,7 @@ void ShowAdvancedRDS() {
|
||||
|
||||
if (hastmcold != radio.rds.hasTMC) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasTMC) tftPrint(-1, "TMC", 88, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasTMC) tftPrint(ALEFT, "TMC", 88, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
hastmcold = radio.rds.hasTMC;
|
||||
}
|
||||
@@ -285,10 +285,10 @@ void showECC() {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasECC) ECCString = (radio.rds.ECCtext.length() == 0 ? textUI(73) : radio.rds.ECCtext); else ECCString = "N/A";
|
||||
if (ECCString != ECColdString) {
|
||||
tftPrint(-1, "N/A", 242, 193, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, ECColdString, 242, 193, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "N/A", 242, 193, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, ECColdString, 242, 193, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, ECCString, 242, 193, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ALEFT, ECCString, 242, 193, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
ECColdString = ECCString;
|
||||
}
|
||||
@@ -320,12 +320,12 @@ void readRds() {
|
||||
if (radio.rds.correctPI != 0 && !dropout) {
|
||||
if (!rdsstatscreen) {
|
||||
if (radio.rds.region == 0) {
|
||||
tftPrint(0, PIold, 275, advancedRDS ? 75 : 187,
|
||||
tftPrint(ACENTER, PIold, 275, advancedRDS ? 75 : 187,
|
||||
RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
tftPrint(-1, PIold, 240, advancedRDS ? 72 : 184,
|
||||
tftPrint(ALEFT, PIold, 240, advancedRDS ? 72 : 184,
|
||||
RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 240, advancedRDS ? 89 : 201,
|
||||
tftPrint(ALEFT, stationIDold, 240, advancedRDS ? 89 : 201,
|
||||
RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint( 1, stationStateold, 318, advancedRDS ? 89 : 201,
|
||||
RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
@@ -338,13 +338,13 @@ void readRds() {
|
||||
PSSprite.pushSprite(36, advancedRDS ? 72 : 185);
|
||||
}
|
||||
|
||||
tftPrint(-1, PTYold, 34, advancedRDS ? 109 : 163,
|
||||
tftPrint(ALEFT, PTYold, 34, advancedRDS ? 109 : 163,
|
||||
RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
|
||||
}
|
||||
|
||||
if (rdsstatscreen && berPercentold != 100) {
|
||||
tftReplace(1, String(berPercentold) + "%", "100%",
|
||||
tftReplace(ARIGHT, String(berPercentold) + "%", "100%",
|
||||
318, 34, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16);
|
||||
berPercentold = 100;
|
||||
}
|
||||
@@ -362,12 +362,12 @@ void readRds() {
|
||||
if (dropout || memreset) {
|
||||
if (!rdsstatscreen) {
|
||||
if (radio.rds.region == 0) {
|
||||
tftPrint(0, PIold, 275, advancedRDS ? 75 : 187,
|
||||
tftPrint(ACENTER, PIold, 275, advancedRDS ? 75 : 187,
|
||||
RDSColor, RDSColorSmooth, 28);
|
||||
} else {
|
||||
tftPrint(-1, PIold, 240, advancedRDS ? 72 : 184,
|
||||
tftPrint(ALEFT, PIold, 240, advancedRDS ? 72 : 184,
|
||||
RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, stationIDold, 240, advancedRDS ? 89 : 201,
|
||||
tftPrint(ALEFT, stationIDold, 240, advancedRDS ? 89 : 201,
|
||||
RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint( 1, stationStateold, 318, advancedRDS ? 89 : 201,
|
||||
advancedRDS ? RDSColor : RDSDropoutColor,
|
||||
@@ -396,7 +396,7 @@ void readRds() {
|
||||
PSSprite.pushSprite(36, advancedRDS ? 72 : 185);
|
||||
}
|
||||
|
||||
tftPrint(-1, PTYold, 34, advancedRDS ? 109 : 163,
|
||||
tftPrint(ALEFT, PTYold, 34, advancedRDS ? 109 : 163,
|
||||
RDSColor, RDSColorSmooth, 16);
|
||||
|
||||
if (!advancedRDS) {
|
||||
@@ -570,40 +570,40 @@ void showPI() {
|
||||
if (advancedRDS) {
|
||||
if (radio.rds.region == 0) {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 75, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 28);
|
||||
tftReplace(ACENTER, PIold, radio.rds.picode, 275, 75, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 28);
|
||||
} else {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 75, RDSColor, RDSColorSmooth, BackgroundColor, 28);
|
||||
tftReplace(ACENTER, PIold, radio.rds.picode, 275, 75, RDSColor, RDSColorSmooth, BackgroundColor, 28);
|
||||
}
|
||||
} else {
|
||||
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.stationIDtext, 240, 89, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(ALEFT, PIold, radio.rds.picode, 240, 72, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, 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.stationIDtext, 240, 89, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(ALEFT, PIold, radio.rds.picode, 240, 72, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, stationIDold, radio.rds.stationIDtext, 240, 89, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
tftReplace(1, stationStateold, radio.rds.stationStatetext, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ARIGHT, 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);
|
||||
tftReplace(ALEFT, PIold, radio.rds.picode, 30, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16);
|
||||
} else if (!rdsstatscreen) {
|
||||
if (radio.rds.region == 0) {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 28);
|
||||
tftReplace(ACENTER, PIold, radio.rds.picode, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 28);
|
||||
} else {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, BackgroundColor, 28);
|
||||
tftReplace(ACENTER, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, BackgroundColor, 28);
|
||||
}
|
||||
} else {
|
||||
if (!RDSstatus) {
|
||||
if (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold) {
|
||||
tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationIDtext, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, PIold, radio.rds.picode, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, stationIDold, radio.rds.stationIDtext, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
} else {
|
||||
if (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold) {
|
||||
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.stationStatetext, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, PIold, radio.rds.picode, 240, 184, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, stationIDold, radio.rds.stationIDtext, 240, 201, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ARIGHT, stationStateold, radio.rds.stationStatetext, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -630,15 +630,15 @@ void showPTY() {
|
||||
if (!screenmute) {
|
||||
if (advancedRDS) {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PTYold, PTYString, 34, 109, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, PTYold, PTYString, 34, 109, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
} else {
|
||||
tftReplace(-1, PTYold, PTYString, 34, 109, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, PTYold, PTYString, 34, 109, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
} else {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PTYold, PTYString, 34, 163, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, PTYold, PTYString, 34, 163, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
} else {
|
||||
tftReplace(-1, PTYold, PTYString, 34, 163, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ALEFT, PTYold, PTYString, 34, 163, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -666,7 +666,7 @@ void showPS() {
|
||||
// Handle AF screen update
|
||||
if (afscreen) {
|
||||
if (!screenmute) {
|
||||
tftReplace(0, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ACENTER, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 16);
|
||||
}
|
||||
} else if (!rdsstatscreen) {
|
||||
// Handle long PS display
|
||||
@@ -844,17 +844,17 @@ void showCT() {
|
||||
}
|
||||
|
||||
// Display the updated time and date
|
||||
tftReplace(0, rds_clockold, rds_clock, 134, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(0, rds_dateold, rds_date, 134, 15, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ACENTER, rds_clockold, rds_clock, 134, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ACENTER, rds_dateold, rds_date, 134, 15, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
} else { // Handle dropout scenarios
|
||||
if (rtcset) { // Display dropout message if RTC was set
|
||||
tftReplace(0, rds_clockold, rds_clock, 134, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(0, rds_dateold, rds_date, 134, 15, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ACENTER, rds_clockold, rds_clock, 134, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(ACENTER, rds_dateold, rds_date, 134, 15, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
} else { // Clear and reprint the clock and date
|
||||
tftPrint(0, rds_clockold, 134, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(0, rds_clock, 134, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(0, rds_dateold, 134, 15, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(0, rds_date, 134, 15, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ACENTER, rds_clockold, 134, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ACENTER, rds_clock, 134, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ACENTER, rds_dateold, 134, 15, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ACENTER, rds_date, 134, 15, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1000,29 +1000,29 @@ void ShowAFEON() {
|
||||
if (radio.eon_counter > 9) {
|
||||
if (!afpage) {
|
||||
afpage = true;
|
||||
tftPrint(1, String(afpagenr) + "/2", 315, 201, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ARIGHT, String(afpagenr) + "/2", 315, 201, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
|
||||
if (afpage) tftPrint(1, String(afpagenr) + "/3", 315, 201, ActiveColor, ActiveColorSmooth, 16); else tftPrint(1, String(afpagenr) + "/2", 315, 201, ActiveColor, ActiveColorSmooth, 16);
|
||||
if (afpage) tftPrint(ARIGHT, String(afpagenr) + "/3", 315, 201, ActiveColor, ActiveColorSmooth, 16); else tftPrint(ARIGHT, String(afpagenr) + "/2", 315, 201, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (radio.rds.hasAF && afpagenr == 1) {
|
||||
if (!hasafold) {
|
||||
tftPrint(-1, textUI(87), 6, 48, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "AF:", 4, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, textUI(87), 6, 48, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "AF:", 4, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
hasafold = true;
|
||||
}
|
||||
|
||||
if (af_counterold != radio.af_updatecounter) {
|
||||
tft.fillRect(2, 48, 316, 150, BackgroundColor);
|
||||
for (byte i = 0; i < radio.af_counter; i++) {
|
||||
tftPrint(-1, (radio.afmethodB && !radio.af[i].regional && radio.af[i].same) ? "S " : (radio.afmethodB && radio.af[i].regional && radio.af[i].same) ? "M " : (radio.afmethodB && radio.af[i].regional && !radio.af[i].same) ? "R " : "", 10 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, (radio.afmethodB && !radio.af[i].regional && radio.af[i].same) ? "S " : (radio.afmethodB && radio.af[i].regional && radio.af[i].same) ? "M " : (radio.afmethodB && radio.af[i].regional && !radio.af[i].same) ? "R " : "", 10 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), ActiveColor, ActiveColorSmooth, 16);
|
||||
if (radio.af[i].checked) {
|
||||
tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), InsignificantColor, InsignificantColorSmooth, 16);
|
||||
tftPrint(ARIGHT, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), InsignificantColor, InsignificantColorSmooth, 16);
|
||||
} else if (!radio.af[i].afvalid) {
|
||||
tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), SignificantColor, SignificantColorSmooth, 16);
|
||||
tftPrint(ARIGHT, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), SignificantColor, SignificantColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ARIGHT, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
if (radio.af_counter > 10) tft.drawLine(59, 54, 59, 191, SecondaryColor);
|
||||
@@ -1035,11 +1035,11 @@ void ShowAFEON() {
|
||||
|
||||
if (radio.eon_counter > 0 && afpagenr > 1) {
|
||||
if (!haseonold) {
|
||||
tftPrint(-1, textUI(88), 6, 48, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "PI", 4, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(0, "TA", 250, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(0, "TP", 276, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(0, "PTY", 304, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, textUI(88), 6, 48, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, "PI", 4, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, "TA", 250, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, "TP", 276, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ACENTER, "PTY", 304, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
haseonold = true;
|
||||
}
|
||||
|
||||
@@ -1077,87 +1077,87 @@ void ShowAFEON() {
|
||||
}
|
||||
|
||||
if (strcmp(eonpicodeold[i + y], radio.eon[i + y].picode) != 0) {
|
||||
tftPrint(-1, eonpicodeold[i + y], 4, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, eonpicodeold[i + y], 4, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, radio.eon[i + y].picode, 4, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(ALEFT, radio.eon[i + y].picode, 4, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
strcpy(eonpicodeold[i + y], radio.eon[i + y].picode);
|
||||
|
||||
if (radio.eon[i + y].ps.length() > 0) {
|
||||
tftPrint(-1, "PS", 46, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "PS", 46, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (strcmp(radio.eon[i + y].ps.c_str(), eonpsold[i + y].c_str()) != 0) {
|
||||
tftPrint(-1, eonpsold[i + y].c_str(), 46, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, eonpsold[i + y].c_str(), 46, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
tftPrint(-1, radio.eon[i + y].ps.c_str(), 46, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(ALEFT, radio.eon[i + y].ps.c_str(), 46, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
eonpsold[i + y] = radio.eon[i + y].ps;
|
||||
} else {
|
||||
tftPrint(-1, eonpsold[i + y].c_str(), 46, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, eonpsold[i + y].c_str(), 46, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].mappedfreq > 0) {
|
||||
tftPrint(-1, "MF", 119, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "MF", 119, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (radio.eon[i + y].mappedfreq != mappedfreqold[i + y]) {
|
||||
char oldFreq[10];
|
||||
dtostrf(mappedfreqold[i + y] / 100.0, 5, 1, oldFreq);
|
||||
tftPrint(-1, oldFreq, 115, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, oldFreq, 115, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
char newFreq[10];
|
||||
dtostrf(radio.eon[i + y].mappedfreq / 100.0, 5, 1, newFreq);
|
||||
tftPrint(-1, newFreq, 115, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(ALEFT, newFreq, 115, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
mappedfreqold[i + y] = radio.eon[i + y].mappedfreq;
|
||||
} else {
|
||||
char oldFreq[10];
|
||||
dtostrf(mappedfreqold[i + y] / 100.0, 5, 1, oldFreq);
|
||||
tftPrint(-1, oldFreq, 115, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, oldFreq, 115, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].mappedfreq2 > 0) {
|
||||
tftPrint(-1, "MF2", 162, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "MF2", 162, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (radio.eon[i + y].mappedfreq2 != mappedfreqold2[i + y]) {
|
||||
char oldFreq2[10];
|
||||
dtostrf(mappedfreqold2[i + y] / 100.0, 5, 1, oldFreq2);
|
||||
tftPrint(-1, oldFreq2, 160, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, oldFreq2, 160, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
char newFreq2[10];
|
||||
dtostrf(radio.eon[i + y].mappedfreq2 / 100.0, 5, 1, newFreq2);
|
||||
tftPrint(-1, newFreq2, 160, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(ALEFT, newFreq2, 160, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
mappedfreqold2[i + y] = radio.eon[i + y].mappedfreq2;
|
||||
} else {
|
||||
char oldFreq2[10];
|
||||
dtostrf(mappedfreqold2[i + y] / 100.0, 5, 1, oldFreq2);
|
||||
tftPrint(-1, oldFreq2, 160, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, oldFreq2, 160, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].mappedfreq3 > 0) {
|
||||
tftPrint(-1, "MF3", 207, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "MF3", 207, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (radio.eon[i + y].mappedfreq3 != mappedfreqold3[i + y]) {
|
||||
char oldFreq3[10];
|
||||
dtostrf(mappedfreqold3[i + y] / 100.0, 5, 1, oldFreq3);
|
||||
tftPrint(-1, oldFreq3, 205, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, oldFreq3, 205, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
char newFreq3[10];
|
||||
dtostrf(radio.eon[i + y].mappedfreq3 / 100.0, 5, 1, newFreq3);
|
||||
tftPrint(-1, newFreq3, 205, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftPrint(ALEFT, newFreq3, 205, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
mappedfreqold3[i + y] = radio.eon[i + y].mappedfreq3;
|
||||
} else {
|
||||
char oldFreq3[10];
|
||||
dtostrf(mappedfreqold3[i + y] / 100.0, 5, 1, oldFreq3);
|
||||
tftPrint(-1, oldFreq3, 205, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(ALEFT, oldFreq3, 205, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].ptyset) {
|
||||
if (eonptyold[i + y] != radio.eon[i + y].pty) tft.fillRect(290, 48 + (15 * i), 29, 16, BackgroundColor);
|
||||
if (radio.eon[i + y].pty != 254) tftPrint(1, String(radio.eon[i + y].pty), 310, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
if (radio.eon[i + y].pty != 254) tftPrint(ARIGHT, String(radio.eon[i + y].pty), 310, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
eonptyold[i + y] = radio.eon[i + y].pty;
|
||||
} else {
|
||||
tft.fillRect(290, 48 + (15 * i), 29, 16, BackgroundColor);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].ta) tftPrint(0, "O", 250, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "O", 250, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.eon[i + y].tp) tftPrint(0, "O", 276, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "O", 276, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.eon[i + y].ta) tftPrint(ACENTER, "O", 250, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(ACENTER, "O", 250, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.eon[i + y].tp) tftPrint(ACENTER, "O", 276, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(ACENTER, "O", 276, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ void ShowRDSStatistics() {
|
||||
|
||||
// --- Update total processed RDS blocks if changed ---
|
||||
if (processed_rdsblocksold[32] != radio.processed_rdsblocks) {
|
||||
tftReplace(1, String(processed_rdsblocksold[32]), String(radio.processed_rdsblocks),
|
||||
tftReplace(ARIGHT, String(processed_rdsblocksold[32]), String(radio.processed_rdsblocks),
|
||||
318, 222, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16);
|
||||
processed_rdsblocksold[32] = radio.processed_rdsblocks;
|
||||
}
|
||||
@@ -1297,9 +1297,9 @@ void ShowRDSStatistics() {
|
||||
}
|
||||
|
||||
// Update percentage display
|
||||
tftReplace(1, oldBuf, newBuf, xpos, ypos,
|
||||
tftReplace(ARIGHT, oldBuf, newBuf, xpos, ypos,
|
||||
PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16);
|
||||
tftPrint(0, "%", xposPct, ypos,
|
||||
tftPrint(ACENTER, "%", xposPct, ypos,
|
||||
ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
// Draw current dot as "Insignificant"
|
||||
@@ -1341,7 +1341,7 @@ void ShowRDSStatistics() {
|
||||
|
||||
// Update display if string changed
|
||||
if (HexString != HexStringold) {
|
||||
tftReplace(0, HexStringold, HexString,
|
||||
tftReplace(ACENTER, HexStringold, HexString,
|
||||
160, 222, ActiveColor, ActiveColorSmooth, BackgroundColor, 16);
|
||||
HexStringold = HexString;
|
||||
}
|
||||
@@ -1388,7 +1388,7 @@ void ShowRDSStatistics() {
|
||||
|
||||
// Update BER display only if value changed
|
||||
if (berPercentold != berPercent) {
|
||||
tftReplace(1, String(berPercentold) + "%", String(berPercent) + "%",
|
||||
tftReplace(ARIGHT, String(berPercentold) + "%", String(berPercent) + "%",
|
||||
318, 34, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16);
|
||||
berPercentold = berPercent;
|
||||
}
|
||||
|
||||
@@ -196,9 +196,8 @@ void doTouchEvent(uint16_t x, uint16_t y) {
|
||||
if (!BWtune && !menu && advancedRDS && !seek && !afscreen) { // Advanced RDS mode
|
||||
if (x > 0 && x < 320 && y > 120 && y < 170) { // -----------------
|
||||
leave = true;
|
||||
BuildDisplay();
|
||||
BuildDisplay(); // Switch to normal radio view
|
||||
SelectBand();
|
||||
// ScreensaverTimerReopen(); // Switch to normal radio view
|
||||
return;
|
||||
} else if (x > 0 && x < 320 && y > 180 && y < 240) {
|
||||
BuildAFScreen();
|
||||
|
||||
Reference in New Issue
Block a user