Merge pull request #632 from MCelliotG/main

Smoother selectors and translations update
This commit is contained in:
Sjef Verhoeven PE5PVB
2024-08-06 21:25:11 +02:00
committed by GitHub
2 changed files with 46 additions and 43 deletions
+30 -30
View File
@@ -870,10 +870,10 @@ void loop() {
if (millis() >= flashingtimer + 500) { if (millis() >= flashingtimer + 500) {
flashing = !flashing; flashing = !flashing;
if (flashing) { if (flashing) {
tft.fillRoundRect(2, 80, 40, 18, 5, SecondaryColor); tft.fillRoundRect(2, 80, 40, 18, 2, SecondaryColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16);
} else { } else {
tft.fillRoundRect(2, 80, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 80, 40, 18, 2, GreyoutColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
} }
flashingtimer = millis(); flashingtimer = millis();
@@ -910,8 +910,8 @@ void loop() {
SQ = true; SQ = true;
if (!screenmute) { if (!screenmute) {
if (advancedRDS) { if (advancedRDS) {
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor); tft.drawRoundRect(10, 30, 300, 170, 2, ActiveColor);
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor); tft.fillRoundRect(12, 32, 296, 166, 2, BackgroundColor);
tftPrint(0, myLanguage[language][34], 160, 100, ActiveColor, ActiveColorSmooth, 28); tftPrint(0, myLanguage[language][34], 160, 100, ActiveColor, ActiveColorSmooth, 28);
} else { } else {
ShowFreq(1); ShowFreq(1);
@@ -2204,10 +2204,10 @@ void SelectBand() {
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
tft.fillRoundRect(249, 57, 30, 18, 5, GreyoutColor); tft.fillRoundRect(249, 57, 30, 18, 2, GreyoutColor);
tftPrint(0, "iMS", 265, 59, BackgroundColor, BackgroundColor, 16); tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16);
tft.fillRoundRect(287, 57, 30, 18, 5, GreyoutColor); tft.fillRoundRect(287, 57, 30, 18, 2, GreyoutColor);
tftPrint(0, "EQ", 301, 59, BackgroundColor, BackgroundColor, 16); tftPrint(0, "EQ", 301, 59, BackgroundColor, GreyoutColor, 16);
tftReplace(-1, "MHz", "kHz", 258, 76, ActiveColor, ActiveColorSmooth, BackgroundColor, 28); tftReplace(-1, "MHz", "kHz", 258, 76, ActiveColor, ActiveColorSmooth, BackgroundColor, 28);
// todo // todo
// if (band == AM_BAND_AIR) tftPrint(-1, "MHz", 258, 76, ActiveColor, ActiveColorSmooth, 28); // if (band == AM_BAND_AIR) tftPrint(-1, "MHz", 258, 76, ActiveColor, ActiveColorSmooth, 28);
@@ -3509,13 +3509,13 @@ void doSquelch() {
void updateBW() {//todo air void updateBW() {//todo air
if (BWset == 0) { if (BWset == 0) {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
tft.fillRoundRect(248, 36, 69, 18, 5, SecondaryColor); tft.fillRoundRect(248, 36, 69, 18, 2, SecondaryColor);
tftPrint(0, "AUTO BW", 282, 38, BackgroundColor, SecondaryColor, 16); tftPrint(0, "AUTO BW", 282, 38, BackgroundColor, SecondaryColor, 16);
} }
radio.setFMABandw(); radio.setFMABandw();
} else { } else {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
tft.fillRoundRect(248, 36, 69, 18, 5, GreyoutColor); tft.fillRoundRect(248, 36, 69, 18, 2, GreyoutColor);
tftPrint(0, "AUTO BW", 282, 38, BackgroundColor, GreyoutColor, 16); tftPrint(0, "AUTO BW", 282, 38, BackgroundColor, GreyoutColor, 16);
} }
} }
@@ -3525,13 +3525,13 @@ void updateiMS() {
if (band < BAND_GAP) { if (band < BAND_GAP) {
if (iMSset == 0) { if (iMSset == 0) {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
tft.fillRoundRect(249, 57, 30, 18, 5, SecondaryColor); tft.fillRoundRect(249, 57, 30, 18, 2, SecondaryColor);
tftPrint(0, "iMS", 265, 59, BackgroundColor, SecondaryColor, 16); tftPrint(0, "iMS", 265, 59, BackgroundColor, SecondaryColor, 16);
} }
radio.setiMS(1); radio.setiMS(1);
} else { } else {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
tft.fillRoundRect(249, 57, 30, 18, 5, GreyoutColor); tft.fillRoundRect(249, 57, 30, 18, 2, GreyoutColor);
tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16); tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16);
} }
radio.setiMS(0); radio.setiMS(0);
@@ -3543,13 +3543,13 @@ void updateEQ() {
if (band < BAND_GAP) { if (band < BAND_GAP) {
if (EQset == 0) { if (EQset == 0) {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
tft.fillRoundRect(287, 57, 30, 18, 5, SecondaryColor); tft.fillRoundRect(287, 57, 30, 18, 2, SecondaryColor);
tftPrint(0, "EQ", 301, 59, BackgroundColor, SecondaryColor, 16); tftPrint(0, "EQ", 301, 59, BackgroundColor, SecondaryColor, 16);
} }
radio.setEQ(1); radio.setEQ(1);
} else { } else {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
tft.fillRoundRect(287, 57, 30, 18, 5, GreyoutColor); tft.fillRoundRect(287, 57, 30, 18, 2, GreyoutColor);
tftPrint(0, "EQ", 301, 59, BackgroundColor, GreyoutColor, 16); tftPrint(0, "EQ", 301, 59, BackgroundColor, GreyoutColor, 16);
} }
radio.setEQ(0); radio.setEQ(0);
@@ -3703,29 +3703,29 @@ void ShowTuneMode() {
case TUNE_MAN: case TUNE_MAN:
if (band == BAND_SW && nowToggleSWMIBand) { if (band == BAND_SW && nowToggleSWMIBand) {
tftPrint(0, "AUTO", 22, 60, GreyoutColor, GreyoutColor, 16); tftPrint(0, "AUTO", 22, 60, GreyoutColor, GreyoutColor, 16);
tft.fillRoundRect(2, 58, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 58, 40, 18, 2, GreyoutColor);
tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16); tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16);
} else { } else {
tftPrint(0, "BAND", 22, 60, GreyoutColor, GreyoutColor, 16); tftPrint(0, "BAND", 22, 60, GreyoutColor, GreyoutColor, 16);
tft.fillRoundRect(2, 58, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 58, 40, 18, 2, GreyoutColor);
tftPrint(0, "AUTO", 22, 60, BackgroundColor, GreyoutColor, 16); tftPrint(0, "AUTO", 22, 60, BackgroundColor, GreyoutColor, 16);
} }
tft.fillRoundRect(2, 36, 40, 18, 5, SecondaryColor); tft.fillRoundRect(2, 36, 40, 18, 2, SecondaryColor);
tftPrint(0, "MAN", 22, 38, BackgroundColor, SecondaryColor, 16); tftPrint(0, "MAN", 22, 38, BackgroundColor, SecondaryColor, 16);
tft.fillRoundRect(2, 80, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 80, 40, 18, 2, GreyoutColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
break; break;
case TUNE_AUTO: case TUNE_AUTO:
tft.fillRoundRect(2, 58, 40, 18, 5, SecondaryColor); tft.fillRoundRect(2, 58, 40, 18, 2, SecondaryColor);
tftPrint(0, "AUTO", 22, 60, BackgroundColor, SecondaryColor, 16); tftPrint(0, "AUTO", 22, 60, BackgroundColor, SecondaryColor, 16);
tft.fillRoundRect(2, 36, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 36, 40, 18, 2, GreyoutColor);
tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16);
tft.fillRoundRect(2, 80, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 80, 40, 18, 2, GreyoutColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
break; break;
@@ -3733,35 +3733,35 @@ void ShowTuneMode() {
if (band == BAND_SW && nowToggleSWMIBand) { if (band == BAND_SW && nowToggleSWMIBand) {
tftPrint(0, "AUTO", 22, 60, GreyoutColor, GreyoutColor, 16); tftPrint(0, "AUTO", 22, 60, GreyoutColor, GreyoutColor, 16);
tft.fillRoundRect(2, 58, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 58, 40, 18, 2, GreyoutColor);
tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16); tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16);
} else { } else {
tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16); tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16);
tft.fillRoundRect(2, 58, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 58, 40, 18, 2, GreyoutColor);
tftPrint(0, "AUTO", 22, 60, BackgroundColor, GreyoutColor, 16); tftPrint(0, "AUTO", 22, 60, BackgroundColor, GreyoutColor, 16);
} }
tft.fillRoundRect(2, 36, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 36, 40, 18, 2, GreyoutColor);
tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16);
if (memorystore) { if (memorystore) {
tft.fillRoundRect(2, 80, 40, 18, 5, SignificantColor); tft.fillRoundRect(2, 80, 40, 18, 2, SignificantColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, SignificantColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, SignificantColor, 16);
} else { } else {
tft.fillRoundRect(2, 80, 40, 18, 5, SecondaryColor); tft.fillRoundRect(2, 80, 40, 18, 2, SecondaryColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16);
} }
break; break;
case TUNE_MI_BAND: case TUNE_MI_BAND:
tft.fillRoundRect(2, 58, 40, 18, 5, SecondaryColor); tft.fillRoundRect(2, 58, 40, 18, 2, SecondaryColor);
tftPrint(0, "BAND", 22, 60, BackgroundColor, SecondaryColor, 16); tftPrint(0, "BAND", 22, 60, BackgroundColor, SecondaryColor, 16);
tft.fillRoundRect(2, 36, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 36, 40, 18, 2, GreyoutColor);
tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16);
tft.fillRoundRect(2, 80, 40, 18, 5, GreyoutColor); tft.fillRoundRect(2, 80, 40, 18, 2, GreyoutColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
break; break;
} }
@@ -4429,7 +4429,7 @@ void cancelDXScan() {
tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor); tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
if (!flashing) { if (!flashing) {
tft.fillRoundRect(2, 80, 40, 18, 5, SecondaryColor); tft.fillRoundRect(2, 80, 40, 18, 2, SecondaryColor);
tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16); tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16);
} }
+16 -13
View File
@@ -1415,10 +1415,10 @@ static const char* const myLanguage[18][281] PROGMEM = {
"Ματαίωση! Πιέση\nπλήκτρου χρήστη", // 274 "Ματαίωση! Πιέση\nπλήκτρου χρήστη", // 274
"Η ανίχνευση ολοκληρώθηκε\nχωρίς σφάλματα", // 275 "Η ανίχνευση ολοκληρώθηκε\nχωρίς σφάλματα", // 275
"Εκκαθάριση καναλιών μνήμης", // 276 "Εκκαθάριση καναλιών μνήμης", // 276
"εγινε εκκαθάριση", // 277 "έγινε εκκαθάριση", // 277
"Prevent double PI", // 278 "Αποφυγή διπλού PI", // 278
"Range", // 279 "Εύρος", // 279
"Full" // 280 "Πλήρης" // 280
}, },
{ "Română", // Romanian { "Română", // Romanian
@@ -2831,9 +2831,10 @@ static const char* const myLanguage[18][281] PROGMEM = {
"Analyse terminée\nsans erreurs", // 275 "Analyse terminée\nsans erreurs", // 275
"Effacer les canaux\nde mémoire", // 276 "Effacer les canaux\nde mémoire", // 276
"effacé", // 277 "effacé", // 277
"Prevent double PI", // 278 "Prévenir double PI", // 278
"Range", // 279 "Plage", // 279
"Full" // 280 "Complet" // 280
}, },
{ "Български", // Bulgarian { "Български", // Bulgarian
@@ -4812,9 +4813,10 @@ static const char* const myLanguage[18][281] PROGMEM = {
"Escaneo finalizado\nsin errores", // 275 "Escaneo finalizado\nsin errores", // 275
"Borrar canales\nde memoria", // 276 "Borrar canales\nde memoria", // 276
"borrado", // 277 "borrado", // 277
"Prevent double PI", // 278 "Prevenir doble PI", // 278
"Range", // 279 "Rango", // 279
"Full" // 280 "Completo" // 280
}, },
{ "Português", // Portuguese { "Português", // Portuguese
@@ -5095,9 +5097,10 @@ static const char* const myLanguage[18][281] PROGMEM = {
"Verificação concluída\nsem erros", // 275 "Verificação concluída\nsem erros", // 275
"Limpar canais\nde memória", // 276 "Limpar canais\nde memória", // 276
"limpo", // 277 "limpo", // 277
"Prevent double PI", // 278 "Prevenir PI duplo", // 278
"Range", // 279 "Intervalo", // 279
"Full" // 280 "Completo" // 280
} }
}; };
#endif #endif