diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index a3c0181..cc32143 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -3228,48 +3228,34 @@ void ShowFreq(int mode) { case 5: FrequencySprite.loadFont(FREQFONT5); break; } - FrequencySprite.setTextDatum(TR_DATUM); + FrequencySprite.fillSprite(BackgroundColor); + + if (mode == 0) { + FrequencySprite.setTextDatum(TR_DATUM); + FrequencySprite.setTextColor(FreqColor, FreqColorSmooth, false); + } else { + FrequencySprite.unloadFont(); + FrequencySprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + FrequencySprite.setTextDatum(TC_DATUM); + if (language == LANGUAGE_CHS) FrequencySprite.loadFont(FONT16_CHS); else FrequencySprite.loadFont(FONT16); + } + switch (mode) { case 0: - FrequencySprite.fillSprite(BackgroundColor); - FrequencySprite.setTextColor(FreqColor, FreqColorSmooth, false); FrequencySprite.drawString(String(freq / 100) + "." + (freq % 100 < 10 ? "0" : "") + String(freq % 100) + " ", 218, -6); - FrequencySprite.pushSprite(46, 46); freqold = freq; break; - case 1: - FrequencySprite.fillSprite(BackgroundColor); - FrequencySprite.pushSprite(46, 46); - tftPrint(0, myLanguage[language][34], 146, 58, ActiveColor, ActiveColorSmooth, 28); - break; - - case 2: - FrequencySprite.fillSprite(BackgroundColor); - FrequencySprite.pushSprite(46, 46); - tftPrint(0, myLanguage[language][290], 146, 58, ActiveColor, ActiveColorSmooth, 28); - break; - - case 3: - FrequencySprite.fillSprite(BackgroundColor); - FrequencySprite.pushSprite(46, 46); - tftPrint(0, myLanguage[language][291], 146, 58, SignificantColor, SignificantColorSmooth, 16); - break; - - case 4: - FrequencySprite.fillSprite(BackgroundColor); - FrequencySprite.pushSprite(46, 46); - tftPrint(0, myLanguage[language][297], 146, 58, SignificantColor, SignificantColorSmooth, 16); - break; - - case 5: - FrequencySprite.fillSprite(BackgroundColor); - FrequencySprite.pushSprite(46, 46); - tftPrint(0, myLanguage[language][303], 146, 58, ActiveColor, ActiveColorSmooth, 16); - delay(400); - break; + case 1: Infoboxprint(myLanguage[language][34]); break; + case 2: Infoboxprint(myLanguage[language][290]); break; + case 3: Infoboxprint(myLanguage[language][291]); break; + case 4: Infoboxprint(myLanguage[language][297]); break; + case 5: Infoboxprint(myLanguage[language][303]); break; } + + FrequencySprite.pushSprite(46, 46); FrequencySprite.unloadFont(); + if (mode == 5) delay(1000); } } } diff --git a/src/gui.cpp b/src/gui.cpp index 5fc28d4..45caf85 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -5542,13 +5542,21 @@ void Infoboxprint(const char* input) { char* line2 = (char*)malloc((length - newlineIndex) * sizeof(char)); strcpy(line2, input + newlineIndex + 1); - - tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28); - tftPrint(0, line2, 155, 78, ActiveColor, ActiveColorSmooth, 28); + if (menu) { + tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28); + tftPrint(0, line2, 155, 78, ActiveColor, ActiveColorSmooth, 28); + } else { + FrequencySprite.drawString(line1, 100, 5); + FrequencySprite.drawString(line2, 100, 25); + } free(line1); free(line2); } else { - tftPrint(0, input, 155, 78, ActiveColor, ActiveColorSmooth, 28); + if (menu) { + tftPrint(0, input, 155, 78, ActiveColor, ActiveColorSmooth, 28); + } else { + FrequencySprite.drawString(input, 100, 15); + } } } diff --git a/src/gui.h b/src/gui.h index 2a62779..155580f 100644 --- a/src/gui.h +++ b/src/gui.h @@ -211,6 +211,7 @@ extern TFT_eSprite MenuInfobox; extern TFT_eSprite FullLineSprite; extern TFT_eSprite OneBigLineSprite; extern TFT_eSprite PSSprite; +extern TFT_eSprite FrequencySprite; void BuildAFScreen(); void BuildMenu(); diff --git a/src/language.h b/src/language.h index 11f84d0..9374a40 100644 --- a/src/language.h +++ b/src/language.h @@ -296,20 +296,20 @@ static const char* const myLanguage[21][305] PROGMEM = { "Download logbook", // 287 "Logbook is empty", // 288 "Go to bottom", // 289 - "Added to log", // 290 - "Update failed!", // 291 + "Entry added\nto the logbook", // 290 + "Error adding\nentry to the logbook", // 291 "Clear logbook", // 292 "Logbook cleared", // 293 "Clear failed", // 294 "Set NTP time offset", // 295 "Autologger", // 296 - "Logbook full!", // 297 + "Can't add entry!\nLogbook is full!", // 297 "Clock mode", // 298 "Auto DST on NTP time", // 299 "The logbook contains over 130 entries, which the viewer cannot process. Please download the CSV file to process it.", // 300 "PI locked CT sync", // 301 "Error! No RDS signal", // 302 - "Hold BW to stop", // 303 + "Hold BW button to\nstop DX scanner", // 303 "PS only" // 304 }, @@ -603,20 +603,20 @@ static const char* const myLanguage[21][305] PROGMEM = { "Download logboek", // 287 "Logboek is leeg", // 288 "Ga naar einde", // 289 - "Logboek update", // 290 - "Log mislukt!", // 291 + "Toegevoegd aan\nhet logboek", // 290 + "Toevoegen aan\nlogboek mislukt!", // 291 "Logboek legen", // 292 "Logboek geleegd", // 293 "Legen mislukt", // 294 "NTP tijdverschil\ninstellen", // 295 "Automatisch loggen", // 296 - "Logboek vol!", // 297 + "Toevoegen mislukt!\nLogboek is vol!", // 297 "Klok methode", // 298 "Auto zomertijd\nop NTP tijd", // 299 "Het logboek bevat meer dan 130 items, die de viewer niet kan verwerken. Download alstublieft het CSV-bestand om het te bekijken.", // 300 "PI gebonden CT sync", // 301 "Fout! Geen RDS!", // 302 - "Stoppen: BW lang indrukken", // 303 + "Houdt BW knop lang\ningedrukt om te stoppen", // 303 "Alleen PS" // 304 },