Fix on stereo/mono indicator (GUI)

This commit is contained in:
Sjef Verhoeven PE5PVB
2023-12-30 20:10:56 +01:00
parent aba7de08c3
commit aebbfbabfd
2 changed files with 43 additions and 41 deletions
+2 -2
View File
@@ -1809,12 +1809,12 @@ void doStereoToggle() {
StereoToggle = false; StereoToggle = false;
} else { } else {
if (!screenmute) { if (!screenmute) {
tft.drawSmoothCircle(71, 15, 10, BackgroundColor, BackgroundColor);
tft.drawSmoothCircle(71, 15, 9, BackgroundColor, BackgroundColor);
tft.drawSmoothCircle(66, 15, 10, GreyoutColor, BackgroundColor); tft.drawSmoothCircle(66, 15, 10, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(66, 15, 9, GreyoutColor, BackgroundColor); tft.drawSmoothCircle(66, 15, 9, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(76, 15, 10, GreyoutColor, BackgroundColor); tft.drawSmoothCircle(76, 15, 10, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(76, 15, 9, GreyoutColor, BackgroundColor); tft.drawSmoothCircle(76, 15, 9, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(71, 15, 10, BackgroundColor, BackgroundColor);
tft.drawSmoothCircle(71, 15, 9, BackgroundColor, BackgroundColor);
} }
radio.setMono(false); radio.setMono(false);
Stereostatusold = false; Stereostatusold = false;
+23 -21
View File
@@ -21,7 +21,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BackgroundColor = TFT_BLACK; BackgroundColor = TFT_BLACK;
ActiveColor = TFT_WHITE; ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3; ActiveColorSmooth = 0x18E3;
FreqColor = TFT_YELLOW; FreqColor = TFT_YELLOW;
FreqColorSmooth = 0x2120; FreqColorSmooth = 0x2120;
SignificantColor = TFT_RED; SignificantColor = TFT_RED;
SignificantColorSmooth = 0x2000; SignificantColorSmooth = 0x2000;
@@ -309,7 +309,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BatteryValueColorSmooth = 0x400A; BatteryValueColorSmooth = 0x400A;
break; break;
case 11: // GoldBrite case 11: // GoldBrite
PrimaryColor = TFT_YELLOW; PrimaryColor = TFT_YELLOW;
PrimaryColorSmooth = 0x2120; PrimaryColorSmooth = 0x2120;
SecondaryColor = TFT_SKYBLUE; SecondaryColor = TFT_SKYBLUE;
@@ -319,7 +319,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BackgroundColor = TFT_BLACK; BackgroundColor = TFT_BLACK;
ActiveColor = TFT_WHITE; ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3; ActiveColorSmooth = 0x18E3;
FreqColor = TFT_WHITE; FreqColor = TFT_WHITE;
FreqColorSmooth = 0x18E3; FreqColorSmooth = 0x18E3;
SignificantColor = TFT_RED; SignificantColor = TFT_RED;
SignificantColorSmooth = 0x2000; SignificantColorSmooth = 0x2000;
@@ -424,7 +424,7 @@ void BuildMenu() {
case MAINSETTINGS: case MAINSETTINGS:
tftPrint(-1, myLanguage[language][108], 8, ITEM1 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][108], 8, ITEM1 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][107], 8, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][107], 8, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][75], 8, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][75], 8, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16);
switch (hardwaremodel) { switch (hardwaremodel) {
case BASE_ILI9341: tftPrint(1, myLanguage[language][109], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break; case BASE_ILI9341: tftPrint(1, myLanguage[language][109], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
@@ -434,7 +434,7 @@ void BuildMenu() {
if (touchrotating) tftPrint(1, myLanguage[language][42], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16); if (touchrotating) tftPrint(1, myLanguage[language][42], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, String(tot), 270, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); if (tot != 0) tftPrint(1, String(tot), 270, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, myLanguage[language][205], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); if (tot != 0) tftPrint(1, myLanguage[language][205], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (dynamicspi) { if (dynamicspi) {
tftPrint(1, "MHz", 310, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "MHz", 310, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][206], 8, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][206], 8, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
@@ -476,7 +476,7 @@ void BuildMenu() {
tftPrint(-1, myLanguage[language][74], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][74], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][173], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][173], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][98], 8, ITEM9 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][98], 8, ITEM9 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][210], 8, ITEM10 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][210], 8, ITEM10 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(1, myLanguage[language][0], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); tftPrint(1, myLanguage[language][0], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "%", 310, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "%", 310, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16);
@@ -501,7 +501,7 @@ void BuildMenu() {
} }
tftPrint(1, unitString[unit], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16); tftPrint(1, unitString[unit], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, FreqFont[freqfont], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16); tftPrint(1, FreqFont[freqfont], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
break; break;
case RDSSETTINGS: case RDSSETTINGS:
@@ -707,15 +707,16 @@ void BuildAdvancedRDS() {
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28);
tft.drawCircle(66, 15, 10, GreyoutColor);
tft.drawCircle(66, 15, 9, GreyoutColor);
tft.drawCircle(76, 15, 10, GreyoutColor);
tft.drawCircle(76, 15, 9, GreyoutColor);
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
if (!StereoToggle) { if (!StereoToggle) {
tft.drawCircle(71, 15, 10, SecondaryColor); tft.drawSmoothCircle(71, 15, 10, SecondaryColor, SecondaryColorSmooth);
tft.drawCircle(71, 15, 9, SecondaryColor); tft.drawSmoothCircle(71, 15, 9, SecondaryColor, SecondaryColorSmooth);
} else {
tft.drawSmoothCircle(66, 15, 10, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(66, 15, 9, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(76, 15, 10, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(76, 15, 9, GreyoutColor, BackgroundColor);
} }
tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
@@ -846,14 +847,15 @@ void BuildDisplay() {
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor); tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
if (band > BAND_GAP) tftPrint(0, "EQ", 303, 59, GreyoutColor, BackgroundColor, 16); if (band > BAND_GAP) tftPrint(0, "EQ", 303, 59, GreyoutColor, BackgroundColor, 16);
tft.drawCircle(66, 15, 10, GreyoutColor);
tft.drawCircle(66, 15, 9, GreyoutColor);
tft.drawCircle(76, 15, 10, GreyoutColor);
tft.drawCircle(76, 15, 9, GreyoutColor);
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
if (!StereoToggle) { if (!StereoToggle) {
tft.drawCircle(71, 15, 10, SecondaryColor); tft.drawSmoothCircle(71, 15, 10, SecondaryColor, SecondaryColorSmooth);
tft.drawCircle(71, 15, 9, SecondaryColor); tft.drawSmoothCircle(71, 15, 9, SecondaryColor, SecondaryColorSmooth);
} else {
tft.drawSmoothCircle(66, 15, 10, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(66, 15, 9, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(76, 15, 10, GreyoutColor, BackgroundColor);
tft.drawSmoothCircle(76, 15, 9, GreyoutColor, BackgroundColor);
} }
if (bandforbidden) bandColor = GreyoutColor; else bandColor = PrimaryColor; if (bandforbidden) bandColor = GreyoutColor; else bandColor = PrimaryColor;
@@ -1544,7 +1546,7 @@ void MenuDown() {
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break; break;
case ITEM4: case ITEM4:
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
@@ -2297,7 +2299,7 @@ void DoMenu() {
Infoboxprint(myLanguage[language][210]); Infoboxprint(myLanguage[language][210]);
tftPrint(0, FreqFont[freqfont], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); tftPrint(0, FreqFont[freqfont], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break; break;
} }
break; break;
case RDSSETTINGS: case RDSSETTINGS: