Merge branch 'main' into New_Model_DP_666
# Conflicts: # TEF6686_ESP32.ino
This commit is contained in:
+4326
-4320
File diff suppressed because it is too large
Load Diff
+12190
-12170
File diff suppressed because it is too large
Load Diff
+22
-1
@@ -8,7 +8,7 @@
|
||||
#include <cstring>
|
||||
|
||||
byte menuitem;
|
||||
byte items[10] = {10, static_cast<byte>(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 7, 6};
|
||||
byte items[10] = {10, static_cast<byte>(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 7, 7};
|
||||
extern mem presets[];
|
||||
bool setWiFiConnectParam = false;
|
||||
|
||||
@@ -1251,6 +1251,12 @@ void ShowOneLine(byte position, byte item, bool selected) {
|
||||
FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
FullLineSprite.drawString((scanmute ? myLanguage[language][42] : myLanguage[language][30]), 298, 2);
|
||||
break;
|
||||
|
||||
case AUTOMEM:
|
||||
FullLineSprite.setTextDatum(TL_DATUM);
|
||||
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
||||
FullLineSprite.drawString(removeNewline(myLanguage[language][276]), 6, 2);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4533,6 +4539,21 @@ void DoMenu() {
|
||||
OneBigLineSprite.drawString((mempionly ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
|
||||
OneBigLineSprite.pushSprite(24, 118);
|
||||
break;
|
||||
|
||||
case ITEM7:
|
||||
Infoboxprint(myLanguage[language][276]);
|
||||
|
||||
ClearMemoryRange(memstartpos, memstoppos);
|
||||
OneBigLineSprite.drawString(myLanguage[language][216], 135, 0);
|
||||
OneBigLineSprite.pushSprite(24, 118);
|
||||
|
||||
switch (CurrentTheme) {
|
||||
case 7: OneBigLineSprite.pushImage(-11, -118, 292, 170, popupbackground_wo); break;
|
||||
default: OneBigLineSprite.pushImage(-11, -118, 292, 170, popupbackground); break;
|
||||
}
|
||||
OneBigLineSprite.drawString(String(memstartpos + 1) + " - " + String(memstoppos + 1) + " " + String(myLanguage[language][277]), 135, 0);
|
||||
OneBigLineSprite.pushSprite(24, 148);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -244,4 +244,5 @@ extern void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, i
|
||||
extern void setAutoSpeedSPI();
|
||||
extern void showAutoSquelch(bool mode);
|
||||
extern uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, uint8_t stopmem, bool pisearch);
|
||||
extern void ClearMemoryRange(uint8_t start, uint8_t stop);
|
||||
#endif
|
||||
+103
-67
@@ -1,11 +1,11 @@
|
||||
#ifndef LANGUAGE_H
|
||||
#define LANGUAGE_H
|
||||
|
||||
#define VERSION "v2.11.2"
|
||||
#define VERSION "v2.11.3"
|
||||
|
||||
// [number of languages][number of texts]
|
||||
|
||||
static const char* const myLanguage[18][276] PROGMEM = {
|
||||
static const char* const myLanguage[18][278] PROGMEM = {
|
||||
{ "English", // English
|
||||
"Rotary direction changed", // 1
|
||||
"Please release button", // 2
|
||||
@@ -281,7 +281,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Nederlands", // Dutch
|
||||
@@ -559,7 +561,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Gevonden", // 272
|
||||
"Afgebroken! Geheugen vol", // 273
|
||||
"Afgebroken! Knop ingedrukt", // 274
|
||||
"Zoeken zonder fouten voltooid" // 275
|
||||
"Zoeken zonder fouten voltooid", // 275
|
||||
"Wis geheugenkanalen", // 276
|
||||
"gewist" // 277
|
||||
},
|
||||
|
||||
{ "Polski", // Polish
|
||||
@@ -837,7 +841,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Hrvatski", // Croatian
|
||||
@@ -1115,7 +1121,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Ελληνικά", // Greek
|
||||
@@ -1315,7 +1323,7 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"AM", // 194
|
||||
"ΣΥΝΔΕΣΗ", // 195
|
||||
"DX MODE", // 196
|
||||
"AUTO MEM", // 197
|
||||
"ΑΥΤ. ΜΝΗΜΗ", // 197
|
||||
"AM εξασθένιση", // 198
|
||||
"FM αποέμφαση", // 199
|
||||
"Μικρό", // 200
|
||||
@@ -1381,19 +1389,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Αρχικό", // 260
|
||||
"Πάντα", //261
|
||||
"Εμφάνιση ρολογιού", // 262
|
||||
"Show long PS", // 263
|
||||
"Start frequency", // 264
|
||||
"Stop frequency", // 265
|
||||
"Start memory channel", // 266
|
||||
"Stop memory channel", // 267
|
||||
"Only store with RDS", // 268
|
||||
"Start auto memory", // 269
|
||||
"Auto memory", // 270
|
||||
"Εμφάνιση μεγάλου PS", // 263
|
||||
"Συχνότητα εκκίνησης", // 264
|
||||
"Τελική συχνότητα", // 265
|
||||
"Αρχικό κανάλι μνήμης", // 266
|
||||
"Τελικό κανάλι μνήμης", // 267
|
||||
"Αποθήκευση μόνο\nμε RDS", // 268
|
||||
"Εκκίνηση αυτόματης μνήμης", // 269
|
||||
"Αυτόματη μνήμη", // 270
|
||||
"ID λίστας σταθμών", // 271
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Βρέθηκαν", // 272
|
||||
"Ματαίωση! Τα κανάλια\nμνήμης εξαντλήθηκαν", // 273
|
||||
"Ματαίωση! Πιέση\nπλήκτρου χρήστη", // 274
|
||||
"Η ανίχνευση ολοκληρώθηκε\nχωρίς σφάλματα", // 275
|
||||
"Εκκαθάριση καναλιών μνήμης", // 276
|
||||
"εγινε εκκαθάριση" // 277
|
||||
},
|
||||
|
||||
{ "Română", // Romanian
|
||||
@@ -1671,7 +1681,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Deutsch", // German
|
||||
@@ -1949,7 +1961,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Český", // Czech
|
||||
@@ -2227,7 +2241,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Magyar", // Hungarian
|
||||
@@ -2505,7 +2521,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Français", // French
|
||||
@@ -2771,19 +2789,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Initial", // 260
|
||||
"Toujours", // 261
|
||||
"Afficher l'horloge", // 262
|
||||
"Show long PS", // 263
|
||||
"Start frequency", // 264
|
||||
"Stop frequency", // 265
|
||||
"Start memory channel", // 266
|
||||
"Stop memory channel", // 267
|
||||
"Only store with RDS", // 268
|
||||
"Start auto memory", // 269
|
||||
"Auto memory", // 270
|
||||
"Stationlist ID", // 271
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Afficher PS long", // 263
|
||||
"Fréquence de début", // 264
|
||||
"Fréquence de fin", // 265
|
||||
"Commencer canal\nde mémoire", // 266
|
||||
"Arrêter canal\nde mémoire", // 267
|
||||
"Seulement stocker\navec RDS", // 268
|
||||
"Commencer mémoire\nautomatique", // 269
|
||||
"Mémoire automatique", // 270
|
||||
"ID de la liste\ndes stations", // 271
|
||||
"Trouvé", // 272
|
||||
"Abandonner! Plus\nde canaux de mémoire", // 273
|
||||
"Abandonner! Bouton\nappuyé par l'user", // 274
|
||||
"Analyse terminée\nsans erreurs", // 275
|
||||
"Effacer les canaux\nde mémoire", // 276
|
||||
"effacé" // 277
|
||||
},
|
||||
|
||||
{ "Български", // Bulgarian
|
||||
@@ -3061,7 +3081,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Русский", // Russian
|
||||
@@ -3339,7 +3361,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Українська", // Ukranian
|
||||
@@ -3617,7 +3641,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Italiano", // Italian
|
||||
@@ -3895,7 +3921,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Simplified Chinese", // Simplified Chinese
|
||||
@@ -4173,7 +4201,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Norsk", // Norwegian
|
||||
@@ -4451,7 +4481,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Scan finished without errors", // 275
|
||||
"Clear memory channels", // 276
|
||||
"cleared" // 277
|
||||
},
|
||||
|
||||
{ "Español", // Spanish
|
||||
@@ -4717,19 +4749,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Inicial", // 260
|
||||
"Siempre", // 261
|
||||
"Mostrar reloj", // 262
|
||||
"Show long PS", // 263
|
||||
"Start frequency", // 264
|
||||
"Stop frequency", // 265
|
||||
"Start memory channel", // 266
|
||||
"Stop memory channel", // 267
|
||||
"Only store with RDS", // 268
|
||||
"Start auto memory", // 269
|
||||
"Auto memory", // 270
|
||||
"Stationlist ID", // 271
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Mostrar PS largo", // 263
|
||||
"Iniciar frecuencia", // 264
|
||||
"Detener frecuencia", // 265
|
||||
"Iniciar canal\nde memoria", // 266
|
||||
"Detener canal\nde memoria", // 267
|
||||
"Solo almacenar\ncon RDS", // 268
|
||||
"Iniciar memoria automática", // 269
|
||||
"Memoria automática", // 270
|
||||
"ID de la lista\nde estaciones", // 271
|
||||
"Encontrado", // 272
|
||||
"¡Abortar! Sin canales\nde memoria disponibles", // 273
|
||||
"¡Abortar! Usuario\npresionó el botón", // 274
|
||||
"Escaneo finalizado\nsin errores", // 275
|
||||
"Borrar canales\nde memoria", // 276
|
||||
"borrado" // 277
|
||||
},
|
||||
|
||||
{ "Português", // Portuguese
|
||||
@@ -4995,19 +5029,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
||||
"Inicial", // 260
|
||||
"Sempre", // 261
|
||||
"Mostrar relógio", // 262
|
||||
"Show long PS", // 263
|
||||
"Start frequency", // 264
|
||||
"Stop frequency", // 265
|
||||
"Start memory channel", // 266
|
||||
"Stop memory channel", // 267
|
||||
"Only store with RDS", // 268
|
||||
"Start auto memory", // 269
|
||||
"Auto memory", // 270
|
||||
"Mostrar PS longo", // 263
|
||||
"Iniciar frequência", // 264
|
||||
"Parar frequência", // 265
|
||||
"Iniciar canal de memória", // 266
|
||||
"Parar canal de memória", // 267
|
||||
"Somente armazenar\ncom RDS", // 268
|
||||
"Iniciar memória automática", // 269
|
||||
"Memória automática", // 270
|
||||
"ID da lista de estações", // 271
|
||||
"Found", // 272
|
||||
"Abort! Out of memorychannels", // 273
|
||||
"Abort! User pressed button", // 274
|
||||
"Scan finished without errors" // 275
|
||||
"Encontrado", // 272
|
||||
"Abortar! Sem canais\nde memória disponíveis", // 273
|
||||
"Abortar! Usuário\npressionou o botão", // 274
|
||||
"Verificação concluída\nsem erros", // 275
|
||||
"Limpar canais\nde memória", // 276
|
||||
"limpo" // 277
|
||||
}
|
||||
};
|
||||
#endif
|
||||
+35
-124
@@ -344,12 +344,12 @@ void readRds() {
|
||||
if (!radio.rds.hasLongPS) {
|
||||
PSSprite.fillSprite(BackgroundColor);
|
||||
PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
PSSprite.drawString(PSold, 0, 0);
|
||||
PSSprite.drawString(PSold, 0, 2);
|
||||
|
||||
if (advancedRDS) {
|
||||
PSSprite.pushSprite(36, 74);
|
||||
PSSprite.pushSprite(36, 72);
|
||||
} else {
|
||||
PSSprite.pushSprite(36, 187);
|
||||
PSSprite.pushSprite(36, 185);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,12 +400,12 @@ void readRds() {
|
||||
if (!radio.rds.hasLongPS) {
|
||||
PSSprite.fillSprite(BackgroundColor);
|
||||
PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
PSSprite.drawString(PSold, 0, 0);
|
||||
PSSprite.drawString(PSold, 0, 2);
|
||||
|
||||
if (advancedRDS) {
|
||||
PSSprite.pushSprite(36, 74);
|
||||
PSSprite.pushSprite(36, 72);
|
||||
} else {
|
||||
PSSprite.pushSprite(36, 187);
|
||||
PSSprite.pushSprite(36, 185);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,13 +707,13 @@ void showPS() {
|
||||
xPos5 = 0;
|
||||
PSSprite.fillSprite(BackgroundColor);
|
||||
if (!RDSstatus || band > BAND_GAP) PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); else PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
PSSprite.drawString(radio.rds.stationName, 0, 0);
|
||||
PSSprite.drawString(radio.rds.stationName, 0, 2);
|
||||
}
|
||||
if (!screenmute) {
|
||||
if (advancedRDS) {
|
||||
PSSprite.pushSprite(36, 74);
|
||||
PSSprite.pushSprite(36, 72);
|
||||
} else {
|
||||
PSSprite.pushSprite(36, 187);
|
||||
PSSprite.pushSprite(36, 185);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -925,22 +925,22 @@ void ShowAFEON() {
|
||||
if (afpagenr == 3) y = 10;
|
||||
|
||||
for (byte i = 0; i < radio.eon_counter; i++) {
|
||||
if (eonpicodeold[i + y] == NULL) {
|
||||
if (eonpicodeold[i + y] == nullptr) {
|
||||
strcpy(eonpicodeold[i + y], "");
|
||||
}
|
||||
if (eonpsold[i + y] == NULL) {
|
||||
if (eonpsold[i + y] == nullptr) {
|
||||
eonpsold[i + y] = "";
|
||||
}
|
||||
if (mappedfreqold[i + y] == NULL) {
|
||||
if (mappedfreqold[i + y] == 0) {
|
||||
mappedfreqold[i + y] = 0;
|
||||
}
|
||||
if (mappedfreqold2[i + y] == NULL) {
|
||||
if (mappedfreqold2[i + y] == 0) {
|
||||
mappedfreqold2[i + y] = 0;
|
||||
}
|
||||
if (mappedfreqold3[i + y] == NULL) {
|
||||
if (mappedfreqold3[i + y] == 0) {
|
||||
mappedfreqold3[i + y] = 0;
|
||||
}
|
||||
if (eonptyold[i + y] == NULL) {
|
||||
if (eonptyold[i + y] == 0) {
|
||||
eonptyold[i + y] = 0;
|
||||
}
|
||||
|
||||
@@ -963,151 +963,62 @@ void ShowAFEON() {
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].mappedfreq > 0) {
|
||||
tftPrint(1, "FREQ", 156, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(1, "MF", 156, 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, 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, oldFreq, 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
char newFreq[10];
|
||||
dtostrf(radio.eon[i + y].mappedfreq / 100.0, 5, 1, newFreq);
|
||||
tftPrint(1, newFreq, 156, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, newFreq, 156, 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, 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "", 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].mappedfreq2 > 0) {
|
||||
tftPrint(1, "MF2", 214, 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, 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, oldFreq2, 214, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
char newFreq2[10];
|
||||
dtostrf(radio.eon[i + y].mappedfreq2 / 100.0, 5, 1, newFreq2);
|
||||
tftPrint(1, newFreq2, 196, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, newFreq2, 214, 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, 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "", 214, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].mappedfreq3 > 0) {
|
||||
tftPrint(1, "MF3", 272, 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, 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, oldFreq3, 272, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
char newFreq3[10];
|
||||
dtostrf(radio.eon[i + y].mappedfreq3 / 100.0, 5, 1, newFreq3);
|
||||
tftPrint(1, newFreq3, 236, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, newFreq3, 272, 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, 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "", 272, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].taset) {
|
||||
if (radio.eon[i + y].ta) {
|
||||
tft.fillCircle(250, 54 + (15 * i), 4, InsignificantColor);
|
||||
} else {
|
||||
tft.fillCircle(250, 54 + (15 * i), 4, BackgroundColor);
|
||||
}
|
||||
} else {
|
||||
tft.fillCircle(250, 54 + (15 * i), 4, BackgroundColor);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].tp) {
|
||||
tft.fillCircle(276, 54 + (15 * i), 4, InsignificantColor);
|
||||
} else {
|
||||
tft.fillCircle(276, 54 + (15 * i), 4, BackgroundColor);
|
||||
}
|
||||
|
||||
if (radio.eon[i + y].pty != eonptyold[i + y]) {
|
||||
tftReplace(0, String(eonptyold[i + y]), (radio.eon[i + y].pty < 32 ? String(radio.eon[i + y].pty) : " "), 304, 48 + (15 * i), RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
||||
if (radio.eon[i + y].pty > 0) {
|
||||
tftPrint(1, String(radio.eon[i + y].pty), 304, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
eonptyold[i + y] = radio.eon[i + y].pty;
|
||||
}
|
||||
|
||||
if (i == 9) i = 254;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (radio.rds.hasAID) {
|
||||
if (aid_counterold != radio.rds.aid_counter) {
|
||||
String AIDStringTemp = "";
|
||||
char id[5];
|
||||
|
||||
for (int y = 0; y < radio.rds.aid_counter; y++) {
|
||||
bool aidProcessed = false;
|
||||
|
||||
for (int i = 0; i < 65; i++) {
|
||||
if (radio.rds.aid[y] == oda_app_ids[i]) {
|
||||
if (!aidProcessed) {
|
||||
for (int z = 0; z < 4; z++) {
|
||||
uint8_t nibble = (radio.rds.aid[y] >> (4 * (3 - z))) & 0xF;
|
||||
if (nibble < 10) {
|
||||
id[z] = nibble + '0';
|
||||
} else {
|
||||
id[z] = nibble - 10 + 'A';
|
||||
}
|
||||
}
|
||||
id[4] = '\0';
|
||||
|
||||
AIDStringTemp += String(id);
|
||||
AIDStringTemp += ": ";
|
||||
AIDStringTemp += oda_app_names[i];
|
||||
|
||||
aidProcessed = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (aidProcessed && y < radio.rds.aid_counter - 1) {
|
||||
AIDStringTemp += " | ";
|
||||
}
|
||||
}
|
||||
aid_counterold = radio.rds.aid_counter;
|
||||
|
||||
if (AIDStringTemp != AIDStringold) {
|
||||
AIDString = String(myLanguage[language][93]) + " - " + String(myLanguage[language][79]) + ": " + AIDStringTemp + " ";
|
||||
AIDWidth = FullLineSprite.textWidth(AIDString);
|
||||
AIDStringold = AIDString;
|
||||
}
|
||||
}
|
||||
|
||||
if (FullLineSprite.textWidth(radio.trimTrailingSpaces(AIDString)) < 270) {
|
||||
xPos = 0;
|
||||
FullLineSprite.fillSprite(BackgroundColor);
|
||||
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
||||
FullLineSprite.drawString(AIDString, xPos, 2);
|
||||
FullLineSprite.drawLine(283, 0, 283, 19, FrameColor);
|
||||
FullLineSprite.pushSprite(5, 220);
|
||||
} else {
|
||||
if (millis() - rtticker >= 5) {
|
||||
if (xPos < -AIDWidth) xPos = 0;
|
||||
if (xPos == 0) {
|
||||
if (millis() - rttickerhold >= 2000) {
|
||||
xPos--;
|
||||
rttickerhold = millis();
|
||||
}
|
||||
} else {
|
||||
xPos--;
|
||||
rttickerhold = millis();
|
||||
tftPrint(-1, String(eonptyold[i + y]), 304, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
FullLineSprite.fillSprite(BackgroundColor);
|
||||
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
||||
FullLineSprite.drawString(AIDString, xPos, 2);
|
||||
FullLineSprite.drawString(AIDString, xPos + AIDWidth, 2);
|
||||
FullLineSprite.drawLine(314, 0, 314, 19, FrameColor);
|
||||
FullLineSprite.pushSprite(5, 220);
|
||||
rtticker = millis();
|
||||
|
||||
if (radio.eon[i + y].ta) tftPrint(0, "X", 250, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "X", 250, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.eon[i + y].tp) tftPrint(0, "X", 276, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "X", 276, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user