Added dualline support for message 34, 290, 291, 297 and 303
This commit is contained in:
+20
-34
@@ -3228,48 +3228,34 @@ void ShowFreq(int mode) {
|
|||||||
case 5: FrequencySprite.loadFont(FREQFONT5); break;
|
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) {
|
switch (mode) {
|
||||||
case 0:
|
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.drawString(String(freq / 100) + "." + (freq % 100 < 10 ? "0" : "") + String(freq % 100) + " ", 218, -6);
|
||||||
FrequencySprite.pushSprite(46, 46);
|
|
||||||
freqold = freq;
|
freqold = freq;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1: Infoboxprint(myLanguage[language][34]); break;
|
||||||
FrequencySprite.fillSprite(BackgroundColor);
|
case 2: Infoboxprint(myLanguage[language][290]); break;
|
||||||
FrequencySprite.pushSprite(46, 46);
|
case 3: Infoboxprint(myLanguage[language][291]); break;
|
||||||
tftPrint(0, myLanguage[language][34], 146, 58, ActiveColor, ActiveColorSmooth, 28);
|
case 4: Infoboxprint(myLanguage[language][297]); break;
|
||||||
break;
|
case 5: Infoboxprint(myLanguage[language][303]); 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FrequencySprite.pushSprite(46, 46);
|
||||||
FrequencySprite.unloadFont();
|
FrequencySprite.unloadFont();
|
||||||
|
if (mode == 5) delay(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-4
@@ -5542,13 +5542,21 @@ void Infoboxprint(const char* input) {
|
|||||||
|
|
||||||
char* line2 = (char*)malloc((length - newlineIndex) * sizeof(char));
|
char* line2 = (char*)malloc((length - newlineIndex) * sizeof(char));
|
||||||
strcpy(line2, input + newlineIndex + 1);
|
strcpy(line2, input + newlineIndex + 1);
|
||||||
|
if (menu) {
|
||||||
tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28);
|
||||||
tftPrint(0, line2, 155, 78, 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(line1);
|
||||||
free(line2);
|
free(line2);
|
||||||
} else {
|
} 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ extern TFT_eSprite MenuInfobox;
|
|||||||
extern TFT_eSprite FullLineSprite;
|
extern TFT_eSprite FullLineSprite;
|
||||||
extern TFT_eSprite OneBigLineSprite;
|
extern TFT_eSprite OneBigLineSprite;
|
||||||
extern TFT_eSprite PSSprite;
|
extern TFT_eSprite PSSprite;
|
||||||
|
extern TFT_eSprite FrequencySprite;
|
||||||
|
|
||||||
void BuildAFScreen();
|
void BuildAFScreen();
|
||||||
void BuildMenu();
|
void BuildMenu();
|
||||||
|
|||||||
+8
-8
@@ -296,20 +296,20 @@ static const char* const myLanguage[21][305] PROGMEM = {
|
|||||||
"Download logbook", // 287
|
"Download logbook", // 287
|
||||||
"Logbook is empty", // 288
|
"Logbook is empty", // 288
|
||||||
"Go to bottom", // 289
|
"Go to bottom", // 289
|
||||||
"Added to log", // 290
|
"Entry added\nto the logbook", // 290
|
||||||
"Update failed!", // 291
|
"Error adding\nentry to the logbook", // 291
|
||||||
"Clear logbook", // 292
|
"Clear logbook", // 292
|
||||||
"Logbook cleared", // 293
|
"Logbook cleared", // 293
|
||||||
"Clear failed", // 294
|
"Clear failed", // 294
|
||||||
"Set NTP time offset", // 295
|
"Set NTP time offset", // 295
|
||||||
"Autologger", // 296
|
"Autologger", // 296
|
||||||
"Logbook full!", // 297
|
"Can't add entry!\nLogbook is full!", // 297
|
||||||
"Clock mode", // 298
|
"Clock mode", // 298
|
||||||
"Auto DST on NTP time", // 299
|
"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
|
"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
|
"PI locked CT sync", // 301
|
||||||
"Error! No RDS signal", // 302
|
"Error! No RDS signal", // 302
|
||||||
"Hold BW to stop", // 303
|
"Hold BW button to\nstop DX scanner", // 303
|
||||||
"PS only" // 304
|
"PS only" // 304
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -603,20 +603,20 @@ static const char* const myLanguage[21][305] PROGMEM = {
|
|||||||
"Download logboek", // 287
|
"Download logboek", // 287
|
||||||
"Logboek is leeg", // 288
|
"Logboek is leeg", // 288
|
||||||
"Ga naar einde", // 289
|
"Ga naar einde", // 289
|
||||||
"Logboek update", // 290
|
"Toegevoegd aan\nhet logboek", // 290
|
||||||
"Log mislukt!", // 291
|
"Toevoegen aan\nlogboek mislukt!", // 291
|
||||||
"Logboek legen", // 292
|
"Logboek legen", // 292
|
||||||
"Logboek geleegd", // 293
|
"Logboek geleegd", // 293
|
||||||
"Legen mislukt", // 294
|
"Legen mislukt", // 294
|
||||||
"NTP tijdverschil\ninstellen", // 295
|
"NTP tijdverschil\ninstellen", // 295
|
||||||
"Automatisch loggen", // 296
|
"Automatisch loggen", // 296
|
||||||
"Logboek vol!", // 297
|
"Toevoegen mislukt!\nLogboek is vol!", // 297
|
||||||
"Klok methode", // 298
|
"Klok methode", // 298
|
||||||
"Auto zomertijd\nop NTP tijd", // 299
|
"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
|
"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
|
"PI gebonden CT sync", // 301
|
||||||
"Fout! Geen RDS!", // 302
|
"Fout! Geen RDS!", // 302
|
||||||
"Stoppen: BW lang indrukken", // 303
|
"Houdt BW knop lang\ningedrukt om te stoppen", // 303
|
||||||
"Alleen PS" // 304
|
"Alleen PS" // 304
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user