You've already forked TEF6686_ESP32
UI tweaks
This commit is contained in:
@@ -732,7 +732,7 @@ void XDRGTKRoutine() {
|
||||
|
||||
case '\0':
|
||||
radio.setMute();
|
||||
if (!screenmute) tft.drawBitmap(92, 4, Speaker, 26, 22, PrimaryColor);
|
||||
if (!screenmute) tft.drawBitmap(2, 4, Speaker, 26, 22, PrimaryColor);
|
||||
if (!screenmute) {
|
||||
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor);
|
||||
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor);
|
||||
@@ -761,7 +761,7 @@ void XDRGTKRoutine() {
|
||||
XDRScan = false;
|
||||
if (VolSet != 0) {
|
||||
radio.setUnMute();
|
||||
if (!screenmute) tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
||||
if (!screenmute) tft.drawBitmap(2, 4, Speaker, 26, 22, GreyoutColor);
|
||||
radio.setVolume(((VolSet * 10) - 40) / 10);
|
||||
}
|
||||
break;
|
||||
@@ -799,12 +799,12 @@ void XDRGTKRoutine() {
|
||||
VolSet = atoi(buff + 1);
|
||||
if (VolSet == 0) {
|
||||
radio.setMute();
|
||||
if (!screenmute) tft.drawBitmap(92, 4, Speaker, 26, 22, PrimaryColor);
|
||||
if (!screenmute) tft.drawBitmap(2, 4, Speaker, 26, 22, PrimaryColor);
|
||||
XDRMute = true;
|
||||
SQ = true;
|
||||
} else {
|
||||
radio.setUnMute();
|
||||
if (!screenmute) tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
||||
if (!screenmute) tft.drawBitmap(2, 4, Speaker, 26, 22, GreyoutColor);
|
||||
radio.setVolume((VolSet - 40) / 10);
|
||||
XDRMute = false;
|
||||
}
|
||||
@@ -831,7 +831,7 @@ void XDRGTKRoutine() {
|
||||
store = true;
|
||||
XDRMute = false;
|
||||
radio.setUnMute();
|
||||
if (!screenmute) tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
||||
if (!screenmute) tft.drawBitmap(2, 4, Speaker, 26, 22, GreyoutColor);
|
||||
VolSet = EEPROM.readByte(EE_BYTE_VOLSET);
|
||||
LowLevelSet = EEPROM.readByte(EE_BYTE_LOWLEVELSET);
|
||||
softmuteam = EEPROM.readByte(EE_BYTE_SOFTMUTEAM);
|
||||
|
||||
65
src/gui.cpp
65
src/gui.cpp
@@ -466,13 +466,14 @@ void BuildAFScreen() {
|
||||
tft.fillScreen(BackgroundColor);
|
||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
||||
tft.drawLine(0, 30, 320, 30, FrameColor);
|
||||
tft.drawLine(0, 15, 53, 15, FrameColor);
|
||||
tft.drawLine(0, 15, 13, 15, FrameColor);
|
||||
tft.drawLine(0, 199, 320, 199, FrameColor);
|
||||
tft.drawLine(0, 218, 320, 218, FrameColor);
|
||||
tft.drawLine(53, 30, 53, 0, FrameColor);
|
||||
tft.drawLine(89, 30, 89, 0, FrameColor);
|
||||
tft.drawLine(120, 30, 120, 0, FrameColor);
|
||||
tft.drawLine(158, 30, 158, 0, FrameColor);
|
||||
tft.drawLine(30, 30, 30, 0, FrameColor);
|
||||
tft.drawLine(67, 30, 67, 0, FrameColor);
|
||||
tft.drawLine(107, 30, 107, 0, FrameColor);
|
||||
tft.drawLine(107, 15, 160, 15, FrameColor);
|
||||
tft.drawLine(160, 30, 160, 0, FrameColor);
|
||||
tft.drawLine(248, 30, 248, 0, FrameColor);
|
||||
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(0, myLanguage[language][33], 160, 222, ActiveColor, ActiveColorSmooth, 16);
|
||||
@@ -2826,15 +2827,15 @@ void BuildAdvancedRDS() {
|
||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
||||
tft.drawLine(0, 30, 320, 30, FrameColor);
|
||||
tft.drawLine(0, 68, 320, 68, FrameColor);
|
||||
tft.drawLine(0, 15, 53, 15, FrameColor);
|
||||
tft.drawLine(107, 15, 160, 15, FrameColor);
|
||||
tft.drawLine(0, 104, 320, 104, FrameColor);
|
||||
tft.drawLine(0, 126, 320, 126, FrameColor);
|
||||
tft.drawLine(120, 30, 120, 0, FrameColor);
|
||||
tft.drawLine(107, 30, 107, 0, FrameColor);
|
||||
tft.drawLine(210, 30, 210, 240, FrameColor);
|
||||
tft.drawLine(53, 30, 53, 0, FrameColor);
|
||||
tft.drawLine(89, 30, 89, 0, FrameColor);
|
||||
tft.drawLine(120, 30, 120, 0, FrameColor);
|
||||
tft.drawLine(158, 30, 158, 0, FrameColor);
|
||||
tft.drawLine(30, 30, 30, 0, FrameColor);
|
||||
tft.drawLine(67, 30, 67, 0, FrameColor);
|
||||
tft.drawLine(107, 30, 107, 0, FrameColor);
|
||||
tft.drawLine(160, 30, 160, 0, FrameColor);
|
||||
tft.drawLine(248, 30, 248, 0, FrameColor);
|
||||
tft.drawLine(0, 140, 210, 140, FrameColor);
|
||||
tft.drawLine(0, 166, 210, 166, FrameColor);
|
||||
@@ -2884,17 +2885,17 @@ void BuildAdvancedRDS() {
|
||||
|
||||
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
|
||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
||||
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawBitmap(2, 4, Speaker, 26, 22, GreyoutColor);
|
||||
|
||||
if (!StereoToggle) {
|
||||
tft.drawCircle(71, 15, 10, SecondaryColor);
|
||||
tft.drawCircle(71, 15, 9, SecondaryColor);
|
||||
tft.drawCircle(48, 15, 10, SecondaryColor);
|
||||
tft.drawCircle(48, 15, 9, SecondaryColor);
|
||||
} else {
|
||||
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.drawCircle(43, 15, 10, GreyoutColor);
|
||||
tft.drawCircle(43, 15, 9, GreyoutColor);
|
||||
tft.drawCircle(53, 15, 10, GreyoutColor);
|
||||
tft.drawCircle(53, 15, 9, GreyoutColor);
|
||||
}
|
||||
|
||||
tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
@@ -2960,16 +2961,16 @@ void BuildDisplay() {
|
||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
||||
tft.drawLine(0, 30, 320, 30, FrameColor);
|
||||
tft.drawLine(0, 100, 320, 100, FrameColor);
|
||||
tft.drawLine(0, 15, 53, 15, FrameColor);
|
||||
tft.drawLine(120, 30, 120, 0, FrameColor);
|
||||
tft.drawLine(107, 15, 160, 15, FrameColor);
|
||||
tft.drawLine(107, 30, 107, 0, FrameColor);
|
||||
tft.drawLine(210, 100, 210, 217, FrameColor);
|
||||
tft.drawLine(248, 30, 248, 0, FrameColor);
|
||||
tft.drawLine(0, 160, 210, 160, FrameColor);
|
||||
tft.drawLine(0, 180, 320, 180, FrameColor);
|
||||
tft.drawLine(0, 217, 320, 217, FrameColor);
|
||||
tft.drawLine(53, 30, 53, 0, FrameColor);
|
||||
tft.drawLine(89, 30, 89, 0, FrameColor);
|
||||
tft.drawLine(158, 30, 158, 0, FrameColor);
|
||||
tft.drawLine(30, 30, 30, 0, FrameColor);
|
||||
tft.drawLine(67, 30, 67, 0, FrameColor);
|
||||
tft.drawLine(160, 30, 160, 0, FrameColor);
|
||||
tft.drawLine(16, 114, 202, 114, ActiveColor);
|
||||
|
||||
if (!showmodulation) tft.drawLine(16, 143, 202, 143, GreyoutColor); else tft.drawLine(16, 143, 202, 143, ActiveColor);
|
||||
@@ -3019,17 +3020,17 @@ void BuildDisplay() {
|
||||
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28);
|
||||
tftPrint(-1, unitString[unit], 282, 145, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
||||
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||
tft.drawBitmap(2, 4, Speaker, 26, 22, GreyoutColor);
|
||||
|
||||
if (!StereoToggle) {
|
||||
tft.drawCircle(71, 15, 10, SecondaryColor);
|
||||
tft.drawCircle(71, 15, 9, SecondaryColor);
|
||||
tft.drawCircle(48, 15, 10, SecondaryColor);
|
||||
tft.drawCircle(48, 15, 9, SecondaryColor);
|
||||
} else {
|
||||
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.drawCircle(43, 15, 10, GreyoutColor);
|
||||
tft.drawCircle(43, 15, 9, GreyoutColor);
|
||||
tft.drawCircle(53, 15, 10, GreyoutColor);
|
||||
tft.drawCircle(53, 15, 9, GreyoutColor);
|
||||
}
|
||||
|
||||
if (autosquelch) showAutoSquelch(1);
|
||||
|
||||
@@ -2756,7 +2756,7 @@ static const char* const myLanguage[21][300] PROGMEM = {
|
||||
"Luminosité de l'affichage", // 29
|
||||
"Éteint", // 30
|
||||
"Allumé", // 31
|
||||
"APPUYEZ MODE POUR SORTIE ET STOCKAGE", // 32
|
||||
"APPUYEZ MODE POUR SORTIE & STOCKAGE", // 32
|
||||
"APPUYEZ SUR BAND POUR FERMER", // 33
|
||||
"RECHERCHE...", // 34
|
||||
"Tuner non détecté", // 35
|
||||
@@ -5474,7 +5474,7 @@ static const char* const myLanguage[21][300] PROGMEM = {
|
||||
"Osvetljenost ekrana", // 29
|
||||
"Isključeno", // 30
|
||||
"Uključeno", // 31
|
||||
"PRITISNITE MODE DA IZLAZITE I SPASITE", // 32
|
||||
"PRITISNITE MODE ZA IZLAZ I SPAS", // 32
|
||||
"PRITISNITE BAND DA ZATVORITE", // 33
|
||||
"SKENIRANJE...", // 34
|
||||
"Tuner nije\ndetektovan", // 35
|
||||
@@ -5776,8 +5776,8 @@ static const char* const myLanguage[21][300] PROGMEM = {
|
||||
"Näytön kirkkaus", // 29
|
||||
"Pois", // 30
|
||||
"Päällä", // 31
|
||||
"Paina MODE poistuaksesi ja tallentaaksesi", // 32
|
||||
"Paina BAND sulkeaksesi", // 33
|
||||
"PAINA MODE POISTU JA TALLENNA", // 32
|
||||
"PAINA BAND SULKEAKSESI", // 33
|
||||
"SKANNATAAN...", // 34
|
||||
"Virittimen havaitseminen\nepäonnistui", // 35
|
||||
"AM-antenni vahvistus", // 36
|
||||
@@ -5928,7 +5928,7 @@ static const char* const myLanguage[21][300] PROGMEM = {
|
||||
"FM-asetukset", // 181
|
||||
"AM-asetukset", // 182
|
||||
"Yhteydet ja kello", // 183
|
||||
"Paina MODE palataksesi", // 184
|
||||
"PAINA MODE PALATAKSESI", // 184
|
||||
"CoChannel-tunnistin", // 185
|
||||
"CoChannel-tunnistin\nherkkyys", // 186
|
||||
"CoChannel-tunnistin\nkynnys", // 187
|
||||
|
||||
@@ -841,14 +841,14 @@ void showCT() {
|
||||
}
|
||||
|
||||
// Display the updated time
|
||||
tftReplace(0, rds_clockold, rds_clock, 26, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(0, rds_clockold, rds_clock, 135, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
} else { // Handle dropout scenarios
|
||||
|
||||
if (rtcset) { // Display dropout message if RTC was set
|
||||
tftReplace(0, rds_clockold, rds_clock, 26, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
tftReplace(0, rds_clockold, rds_clock, 135, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
|
||||
} else { // Clear and reprint the clock
|
||||
tftPrint(0, rds_clockold, 26, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(0, rds_clock, 26, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(0, rds_clockold, 135, 1, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(0, rds_clock, 135, 1, BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user