Added different fonts for frequency

Added extra theme
This commit is contained in:
Sjef Verhoeven PE5PVB
2023-12-29 21:29:35 +01:00
parent 792902c48e
commit 0c4635ee88
6 changed files with 4917 additions and 1851 deletions
+4554 -1608
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -109,7 +109,7 @@
#define EE_PRESETS_CNT 99
#define EE_CHECKBYTE_VALUE 3 // 0 ~ 255,add new entry, change for new value
#define EE_TOTAL_CNT 821
#define EE_TOTAL_CNT 822
#define EE_UINT16_FREQUENCY_FM 0
#define EE_BYTE_VOLSET 4
#define EE_BYTE_STEREO 5
@@ -187,15 +187,18 @@
#define EE_BYTE_SPISPEED 121
#define EE_BYTE_AMSCANSENS 122
#define EE_BYTE_FMSCANSENS 123
#define EE_PRESETS_BAND_START 124
#define EE_PRESET_BW_START 224
#define EE_PRESET_MS_START 324
#define EE_PRESETS_START 424
#define EE_BYTE_FREQFONT 124
#define EE_PRESETS_BAND_START 125
#define EE_PRESET_BW_START 225
#define EE_PRESET_MS_START 325
#define EE_PRESETS_START 425
#define EE_PRESETS_FREQUENCY 0
// End of EEPROM index defines
static const char* const unitString[] = {"dBμV", "dBf", "dBm"};
static const char* const FreqFont[] = {"Classic", "Roubenstil", "Motoya", "Aura2", "Comic"};
static const char* const Theme[] = {"Essence", "Cyan", "Crimson", "Monochrome", "Volcano", "Dendro", "Sakura", "Whiteout", "Tangerine", "Ocean", "Indigo", "GoldBrite"};
// FM band: before BAND_GAP; AM band: after BAND_GAP
enum RADIO_BAND {
+118 -58
View File
@@ -7,7 +7,7 @@
#include <cstring>
byte menuitem;
byte items[8] = {8, static_cast<byte>(dynamicspi ? 3 : 2), 7, 10, 9, 10, 10, 5};
byte items[8] = {8, static_cast<byte>(dynamicspi ? 4 : 3), 7, 10, 9, 10, 10, 5};
void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de/online/rgb565-color-picker/
switch (CurrentTheme) {
@@ -21,6 +21,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BackgroundColor = TFT_BLACK;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
FreqColor = TFT_YELLOW;
FreqColorSmooth = 0x2120;
SignificantColor = TFT_RED;
SignificantColorSmooth = 0x2000;
InsignificantColor = TFT_GREEN;
@@ -35,7 +37,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x0144;
BatteryValueColor = 0x07F7;
BatteryValueColorSmooth = TFT_BLACK;
CurrentThemeString = myLanguage[language][78];
break;
case 1: // Cyan theme
PrimaryColor = 0x0F3F;
@@ -45,6 +46,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x01e9;
GreyoutColor = 0x2A08;
BackgroundColor = TFT_BLACK;
FreqColor = 0x0F3F;
FreqColorSmooth = 0x0105;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
@@ -61,7 +64,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x0144;
BatteryValueColor = 0x07F7;
BatteryValueColorSmooth = 0x0144;
CurrentThemeString = myLanguage[language][79];
break;
case 2: // Crimson theme
PrimaryColor = 0xF8C3;
@@ -71,6 +73,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x3800;
GreyoutColor = 0x4A69;
BackgroundColor = TFT_BLACK;
FreqColor = 0xF8C3;
FreqColorSmooth = 0x3800;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_GREEN;
@@ -87,7 +91,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x4124;
BatteryValueColor = 0xFA8D;
BatteryValueColorSmooth = 0x3083;
CurrentThemeString = myLanguage[language][80];
break;
case 3: // Monochrome theme
PrimaryColor = TFT_WHITE;
@@ -97,6 +100,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x2965;
GreyoutColor = 0x4A69;
BackgroundColor = TFT_BLACK;
FreqColor = TFT_WHITE;
FreqColorSmooth = TFT_BLACK;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = TFT_BLACK;
SignificantColor = TFT_RED;
@@ -113,7 +118,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x1082;
BatteryValueColor = TFT_WHITE;
BatteryValueColorSmooth = TFT_BLACK;
CurrentThemeString = myLanguage[language][81];
break;
case 4: // Volcano theme
PrimaryColor = TFT_ORANGE;
@@ -123,6 +127,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x2965;
GreyoutColor = 0x5140;
BackgroundColor = 0x0806;
FreqColor = TFT_ORANGE;
FreqColorSmooth = 0x2965;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
@@ -139,7 +145,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x3080;
BatteryValueColor = 0xF980;
BatteryValueColorSmooth = 0x3080;
CurrentThemeString = myLanguage[language][82];
break;
case 5: // Dendro theme
PrimaryColor = TFT_GREEN;
@@ -149,6 +154,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x0200;
GreyoutColor = 0x4A69;
BackgroundColor = TFT_BLACK;
FreqColor = TFT_GREEN;
FreqColorSmooth = 0x0200;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
@@ -165,7 +172,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x0184;
BatteryValueColor = 0x07F6;
BatteryValueColorSmooth = 0x0184;
CurrentThemeString = myLanguage[language][83];
break;
case 6: // Sakura theme
PrimaryColor = 0xF3D5;
@@ -175,6 +181,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x3845;
GreyoutColor = 0x38C5;
BackgroundColor = TFT_BLACK;
FreqColor = 0xF3D5;
FreqColorSmooth = 0x3008;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
@@ -191,7 +199,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x2802;
BatteryValueColor = 0xF00A;
BatteryValueColorSmooth = 0x2802;
CurrentThemeString = myLanguage[language][84];
break;
case 7: // Whiteout theme
PrimaryColor = TFT_BLACK;
@@ -201,6 +208,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x630C;
GreyoutColor = 0x9492;
BackgroundColor = 0xDFFC;
FreqColor = TFT_BLACK;
FreqColorSmooth = TFT_WHITE;
ActiveColor = TFT_BLACK;
ActiveColorSmooth = 0xDFFC;
SignificantColor = TFT_RED;
@@ -217,7 +226,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = TFT_WHITE;
BatteryValueColor = TFT_BLACK;
BatteryValueColorSmooth = TFT_WHITE;
CurrentThemeString = myLanguage[language][85];
break;
case 8: // Tangerine theme
PrimaryColor = 0xF980;
@@ -227,6 +235,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x38A1;
GreyoutColor = 0x6247;
BackgroundColor = TFT_BLACK;
FreqColor = 0xF980;
FreqColorSmooth = 0x3080;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
@@ -243,7 +253,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x3940;
BatteryValueColor = 0xED20;
BatteryValueColorSmooth = 0x3940;
CurrentThemeString = myLanguage[language][170];
break;
case 9: // Ocean theme
PrimaryColor = 0x01FF;
@@ -253,12 +262,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x0010;
GreyoutColor = 0x420C;
BackgroundColor = TFT_BLACK;
FreqColor = 0x01FF;
FreqColorSmooth = 0x0006;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
SignificantColorSmooth = 0x2000;
InsignificantColor = TFT_GREEN;
InsignificantColorSmooth = 0x00C0;
InsignificantColor = 0x0F3F;
InsignificantColorSmooth = 0x0105;
StereoColor = 0x01FF;
StereoColorSmooth = 0x0006;
RDSColor = 0x01FF;
@@ -269,7 +280,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x0106;
BatteryValueColor = 0x051F;
BatteryValueColorSmooth = 0x0106;
CurrentThemeString = myLanguage[language][171];
break;
case 10: // Indigo theme
PrimaryColor = 0x881F;
@@ -279,6 +289,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
FrameColor = 0x6016;
GreyoutColor = 0x49AC;
BackgroundColor = TFT_BLACK;
FreqColor = 0x881F;
FreqColorSmooth = 0x2007;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
@@ -295,7 +307,34 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BWAutoColorSmooth = 0x400A;
BatteryValueColor = 0xD01F;
BatteryValueColorSmooth = 0x400A;
CurrentThemeString = myLanguage[language][172];
break;
case 11: // GoldBrite
PrimaryColor = TFT_YELLOW;
PrimaryColorSmooth = 0x2120;
SecondaryColor = TFT_SKYBLUE;
SecondaryColorSmooth = 0x10E4;
FrameColor = TFT_BLUE;
GreyoutColor = 0x39A7;
BackgroundColor = TFT_BLACK;
ActiveColor = TFT_WHITE;
ActiveColorSmooth = 0x18E3;
FreqColor = TFT_WHITE;
FreqColorSmooth = 0x18E3;
SignificantColor = TFT_RED;
SignificantColorSmooth = 0x2000;
InsignificantColor = 0x01FF;
InsignificantColorSmooth = 0x0006;
StereoColor = TFT_RED;
StereoColorSmooth = 0x2000;
RDSColor = TFT_YELLOW;
RDSColorSmooth = 0x2120;
BarSignificantColor = TFT_RED;
BarInsignificantColor = 0x01FF;
BWAutoColor = 0x07F7;
BWAutoColorSmooth = 0x0144;
BatteryValueColor = 0x07F7;
BatteryValueColorSmooth = TFT_BLACK;
break;
}
}
@@ -385,6 +424,7 @@ void BuildMenu() {
case MAINSETTINGS:
tftPrint(-1, myLanguage[language][108], 8, ITEM1 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][107], 8, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][75], 8, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16);
switch (hardwaremodel) {
case BASE_ILI9341: tftPrint(1, myLanguage[language][109], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
@@ -393,12 +433,13 @@ void BuildMenu() {
}
if (touchrotating) tftPrint(1, myLanguage[language][42], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, String(tot), 270, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, myLanguage[language][205], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (dynamicspi) {
tftPrint(1, "MHz", 310, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][206], 8, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16);
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 270, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
else tftPrint(1, String(spispeed * 10, DEC), 270, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "MHz", 310, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][206], 8, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 270, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16);
else tftPrint(1, String(spispeed * 10, DEC), 270, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16);
}
break;
@@ -435,17 +476,16 @@ void BuildMenu() {
tftPrint(-1, myLanguage[language][74], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][173], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][98], 8, ITEM9 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][75], 8, ITEM10 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][210], 8, ITEM10 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(1, myLanguage[language][0], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "%", 310, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(1, String(ContrastSet, DEC), 270, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (usesquelch) tftPrint(1, myLanguage[language][42], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (showmodulation) tftPrint(1, myLanguage[language][42], 310, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, CurrentThemeString, 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, Theme[CurrentTheme], 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (screensaverset) tftPrint(1, myLanguage[language][92], 310, ITEM6 + 6, ActiveColor, ActiveColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (screensaverset) tftPrint(1, String(screensaverOptions[screensaverset], DEC), 270, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, myLanguage[language][205], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
switch (poweroptions) {
case LCD_OFF: tftPrint(1, myLanguage[language][76], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
@@ -461,7 +501,7 @@ void BuildMenu() {
}
tftPrint(1, unitString[unit], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, String(tot), 270, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, FreqFont[freqfont], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
break;
case RDSSETTINGS:
@@ -907,6 +947,20 @@ void MenuUp() {
break;
case ITEM3:
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, BackgroundColor, BackgroundColor, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
switch (tot) {
case 0: tot = 15; break;
case 15: tot = 30; break;
case 30: tot = 60; break;
case 60: tot = 90; break;
default: tot = 0; break;
}
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM4:
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
@@ -1022,12 +1076,12 @@ void MenuUp() {
case ITEM5:
CurrentTheme ++;
if (CurrentTheme > 10) CurrentTheme = 0;
if (CurrentTheme > 11) CurrentTheme = 0;
doTheme();
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor);
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor);
tftPrint(0, myLanguage[language][77], 155, 78, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, CurrentThemeString, 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
tftPrint(0, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM6:
@@ -1085,18 +1139,11 @@ void MenuUp() {
break;
case ITEM10:
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, BackgroundColor, BackgroundColor, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
switch (tot) {
case 0: tot = 15; break;
case 15: tot = 30; break;
case 30: tot = 60; break;
case 60: tot = 90; break;
default: tot = 0; break;
}
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
tftPrint(0, String(FreqFont[freqfont]), 155, 118, BackgroundColor, BackgroundColor, 28);
freqfont ++;
if (freqfont > 4) freqfont = 0;
tftPrint(0, String(FreqFont[freqfont]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
}
break;
@@ -1482,7 +1529,22 @@ void MenuDown() {
if (touchrotating) touchrotating = 0; else touchrotating = 1;
if (touchrotating) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM3:
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, BackgroundColor, BackgroundColor, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
switch (tot) {
case 15: tot = 0; break;
case 30: tot = 15; break;
case 60: tot = 30; break;
case 90: tot = 60; break;
default: tot = 90; break;
}
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM4:
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
@@ -1599,12 +1661,12 @@ void MenuDown() {
case ITEM5:
CurrentTheme --;
if (CurrentTheme > 10) CurrentTheme = 10;
if (CurrentTheme > 10) CurrentTheme = 11;
doTheme();
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor);
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor);
tftPrint(0, myLanguage[language][77], 155, 78, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, CurrentThemeString, 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
tftPrint(0, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM6:
@@ -1660,20 +1722,13 @@ void MenuDown() {
if (unit > 2) unit = 2;
tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM10:
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, BackgroundColor, BackgroundColor, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
switch (tot) {
case 15: tot = 0; break;
case 30: tot = 15; break;
case 60: tot = 30; break;
case 90: tot = 60; break;
default: tot = 90; break;
}
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
tftPrint(0, String(FreqFont[freqfont]), 155, 118, BackgroundColor, BackgroundColor, 28);
freqfont --;
if (freqfont > 4) freqfont = 4;
tftPrint(0, String(FreqFont[freqfont]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
}
break;
@@ -2121,6 +2176,12 @@ void DoMenu() {
break;
case ITEM3:
Infoboxprint(myLanguage[language][75]);
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM4:
Infoboxprint(myLanguage[language][206]);
tftPrint(-1, "MHz", 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(spispeed * 10 , DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
@@ -2197,7 +2258,7 @@ void DoMenu() {
case ITEM5:
Infoboxprint(myLanguage[language][77]);
tftPrint(0, CurrentThemeString, 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
tftPrint(0, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
case ITEM6:
@@ -2233,11 +2294,10 @@ void DoMenu() {
break;
case ITEM10:
Infoboxprint(myLanguage[language][75]);
if (tot != 0) tftPrint(-1, myLanguage[language][205], 170, 118, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(1, String(tot), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
}
Infoboxprint(myLanguage[language][210]);
tftPrint(0, FreqFont[freqfont], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
}
break;
case RDSSETTINGS:
+3 -1
View File
@@ -79,6 +79,7 @@ extern byte fmscansens;
extern byte fmdefaultstepsize;
extern byte fmnb;
extern byte fmdeemphasis;
extern byte freqfont;
extern byte amcodect;
extern byte amcodectcount;
extern byte amrfagc;
@@ -128,6 +129,8 @@ extern int BatteryValueColorSmooth;
extern int BWAutoColor;
extern int BWAutoColorSmooth;
extern int FrameColor;
extern int FreqColor;
extern int FreqColorSmooth;
extern int GreyoutColor;
extern int InsignificantColor;
extern int InsignificantColorSmooth;
@@ -149,7 +152,6 @@ extern int16_t SStatus;
extern int8_t LevelOffset;
extern int8_t LowLevelSet;
extern int8_t VolSet;
extern String CurrentThemeString;
extern String eonpsold[20];
extern String PIold;
extern String pinstringold;
+182 -164
View File
@@ -1,11 +1,11 @@
#ifndef LANGUAGE_H
#define LANGUAGE_H
#define VERSION "v2.00"
#define VERSION "v2.00.1"
// [number of languages][number of texts]
// *** means the text is the same as in English
static const char* const myLanguage[18][210] = {
static const char* const myLanguage[18][211] = {
{ "English", // English
"Rotary direction changed", // 1
"Please release button", // 2
@@ -84,14 +84,14 @@ static const char* const myLanguage[18][210] = {
"Time-out timer", // 75
"Screen off", // 76
"Theme", // 77
"Default", // 78
"Cyan", // 79
"Crimson", // 80
"Monochrome", // 81
"Volcano", // 82
"Dendro", // 83
"Sakura", // 84
"Whiteout", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"NOT POSSIBLE", // 86
"No AF available", // 87
"No EON available", // 88
@@ -215,7 +215,8 @@ static const char* const myLanguage[18][210] = {
"Dynamic SPI speed", // 206
"Scan sensitivity", // 207
"NONE", // 208
"Software version" // 209
"Software version", // 209
"Frequency font" // 210
},
{ "Nederlands", // Dutch
@@ -296,14 +297,14 @@ static const char* const myLanguage[18][210] = {
"Auto uitschakelen", // 75
"Scherm uit", // 76
"Thema", // 77
"Standaard", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"NIET MOGELIJK", // 86
"Geen AF data", // 87
"Geen EON data", // 88
@@ -427,7 +428,8 @@ static const char* const myLanguage[18][210] = {
"Dynamische\nSPI snelheid", // 206
"Zoek gevoeligheid", // 207
"Geen", // 208
"Software versie" // 209
"Software versie", // 209
"Frequentie font" // 210
},
{ "Polski", // Polish
@@ -508,14 +510,14 @@ static const char* const myLanguage[18][210] = {
"Wyłącznik czasowy", // 75
"Wyłącz ekran", // 76
"Motyw", // 77
"Domyślny", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"NIEMOŻLIWE", // 86
"AF niedostępny", // 87
"EON niedostępny", // 88
@@ -639,7 +641,8 @@ static const char* const myLanguage[18][210] = {
"Dynam. prędkość SPI", // 206
"Czułość skanowania", // 207
"BRAK", // 208
"Wersja oprogramowania" // 209
"Wersja oprogramowania", // 209
"Frequency font" // 210 ***
},
{ "Hrvatski", // Croatian
@@ -720,14 +723,14 @@ static const char* const myLanguage[18][210] = {
"Time-out timer", // 75 ***
"Zaslon isključiti", // 76
"Tema dizajna", // 77
"Zadano", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"NIJE MOGUĆE", // 86
"AF nedostupan", // 87
"EON nedostupan", // 88
@@ -851,7 +854,8 @@ static const char* const myLanguage[18][210] = {
"Dynamic SPI speed", // 206 ***
"Scan sensitivity", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Ελληνικά", // Greek
@@ -932,14 +936,14 @@ static const char* const myLanguage[18][210] = {
"Χρονοδιακόπτης λήξης", // 75
"Οθόνη σβηστή", // 76
"Θέμα", // 77
"Προεπιλογή", // 78
"Κυανό", // 79
"Βυσσινί", // 80
"Μονόχρωμο", // 81
"Ηφαίστειο", // 82
"Δένδρο", // 83
"Σάκουρα", // 84
"Λευκό τοπίο", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"ΜΗ ΔΥΝΑΤΟ", // 86
"Μη διαθέσιμο AF", // 87
"Μη διαθέσιμο EON", // 88
@@ -1063,7 +1067,8 @@ static const char* const myLanguage[18][210] = {
"Δυναμική ταχύτητα\nSPI", // 206
"Ευαισθησία\nανίχνευσης", // 207
"KAMIA", // 208
"Έκδοση λογισμικού" // 209
"Έκδοση λογισμικού", // 209
"Frequency font" // 210 ***
},
{ "Română", // Romanian
@@ -1144,14 +1149,14 @@ static const char* const myLanguage[18][210] = {
"Intervalul de timp", // 75
"Ecran oprit", // 76
"Teme", // 77
"Implicit", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"Nu este posibil", // 86
"Fără AF disponibil", // 87
"Fără EON disponibil", // 88
@@ -1275,7 +1280,8 @@ static const char* const myLanguage[18][210] = {
"Dynamic SPI speed", // 206 ***
"Scan sensitivity", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Deutsch", // German
@@ -1356,14 +1362,14 @@ static const char* const myLanguage[18][210] = {
"Abschaltzeit", // 75
"Bildschirm aus", // 76
"Thema", // 77
"Standard", // 78
"Cyan", // 79
"Crimson", // 80
"Monochrom", // 81
"Volcano", // 82
"Dendro", // 83
"Sakura", // 84
"Whiteout", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"NICHT MÖGLICH", // 86
"Keine AF verfügbar", // 87
"Kein EON verfügbar", // 88
@@ -1487,7 +1493,8 @@ static const char* const myLanguage[18][210] = {
"Dynamische \nSPI-Geschwindigkeit", // 206
"Scanempfindlichkeit", // 207
"KEINE", // 208
"Softwareversion" // 209
"Softwareversion", // 209
"Frequency font" // 210 ***
},
{ "Český", // Czech
@@ -1568,14 +1575,14 @@ static const char* const myLanguage[18][210] = {
"Čas", // 75
"Vypnutí obrazovky", // 76
"Vzhled", // 77
"Výchozí", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"ODPOJTE USB", // 86
"AF nedostupné", // 87
"EON nedostupný", // 88
@@ -1699,7 +1706,8 @@ static const char* const myLanguage[18][210] = {
"Dynamic SPI speed", // 206 ***
"Scan sensitivity", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Slovenský", // Slovak
@@ -1780,14 +1788,14 @@ static const char* const myLanguage[18][210] = {
"Čas", // 75
"Vypnutie obrazovky", // 76
"Vzhľad", // 77
"Východzí", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"ODPOJTE USB", // 86
"AF nedostupné", // 87
"EON nedostupný", // 88
@@ -1911,7 +1919,8 @@ static const char* const myLanguage[18][210] = {
"Dynamic SPI speed", // 206 ***
"Scan sensitivity", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Français", // French
@@ -1992,14 +2001,14 @@ static const char* const myLanguage[18][210] = {
"Temporisateur", // 75
"Affichage éteint", // 76
"Thème", // 77
"Défaut", // 78
"Cyan", // 79
"Cramoisi", // 80
"Monochrome", // 81
"Volcan", // 82
"Dendro", // 83
"Sakura", // 84
"Voile blanc", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"IMPOSSIBLE", // 86
"AF indisponible", // 87
"EON indisponible", // 88
@@ -2123,7 +2132,8 @@ static const char* const myLanguage[18][210] = {
"Vitesse SPI\ndynamique", // 206
"Sensibilité\ndu scanne ", // 207
"AUCUNE", // 208
"Version de logiciel" // 209
"Version de logiciel", // 209
"Frequency font" // 210 ***
},
{ "Български", // Bulgarian
@@ -2204,14 +2214,14 @@ static const char* const myLanguage[18][210] = {
"Time-out timer", // 75 ***
"Изключен дисплей", // 76
"Тема", // 77
"По подразбиране", // 78
"Циан", // 79
"Crimson", // 80 ***
"Двуцветен", // 81
"Вулкан", // 82
"Горски", // 83
"Червено бял", // 84
"Бяла буря", // 85
"", // 78
"", // 79
"", // 80 ***
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"НЕ Е ВЪЗМОЖНО", // 86
"AF опцията не е налична", // 87
"EON опцията не е налична", // 88
@@ -2335,7 +2345,8 @@ static const char* const myLanguage[18][210] = {
"Dynamic SPI speed", // 206 ***
"Scan sensitivity", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Русский", // Russian
@@ -2416,14 +2427,14 @@ static const char* const myLanguage[18][210] = {
"Глубокий сон", // 75
"Погасить экран", // 76
"Тема", // 77
"Default", // 78
"Cyan", // 79
"Crimson", // 80
"Monochrome", // 81
"Volcano", // 82
"Dendro", // 83
"Sakura", // 84
"Whiteout", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"НЕВОЗМОЖНО", // 86
"Нет данных", // 87
"Нет данных", // 88
@@ -2547,7 +2558,8 @@ static const char* const myLanguage[18][210] = {
"Частота шины дисплея SPI", // 206 ***
"Чувствительность сканирования", // 207
"Отсутствуют", // 208
"Версия прошивки" // 209
"Версия прошивки", // 209
"Frequency font" // 210 ***
},
{ "Українська", // Ukranian
@@ -2628,14 +2640,14 @@ static const char* const myLanguage[18][210] = {
"Таймер тайм-ауту", // 75
"Екран вимкнено", // 76
"Тема", // 77
"За замовчуванням", // 78
"Ціан", // 79
"Малиновий", // 80
"Монохромний", // 81
"Вулкан", // 82
"Дендро", // 83
"Сакура", // 84
"Білесенький", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"НЕ МОЖЛИВО", // 86
"Немає доступних AF", // 87
"Немає доступного EON", // 88
@@ -2759,7 +2771,8 @@ static const char* const myLanguage[18][210] = {
"Швидкість шини дисплея (SPI)", // 206 ***
"Чутливість сканування", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Версія ПО" // 209
"Версія ПО", // 209
"Frequency font" // 210 ***
},
{ "Italiano", // Italian
@@ -2840,14 +2853,14 @@ static const char* const myLanguage[18][210] = {
"Timer di time-out", // 75 ***
"Schermo spento", // 76
"Motivo schermo", // 77
"Predefinito", // 78
"Ciano", // 79
"Cremisi", // 80
"Monocromatico", // 81
"Vulcano", // 82
"Dendro", // 83 ***
"Sakura", // 84 ***
"Sbiancato", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83 ***
"", // 84 ***
"", // 85
"IMPOSSIBILE", // 86
"AF non disponibile", // 87
"EON non disponibile", // 88
@@ -2971,7 +2984,8 @@ static const char* const myLanguage[18][210] = {
"Velocità SPI Dinamico", // 206 ***
"Sensibilità scansione", // 207
"NONE", // 208 represents: AM/FM bands unavailable(please delete this note after translation
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Simplified Chinese", // Simplified Chinese
@@ -3052,14 +3066,14 @@ static const char* const myLanguage[18][210] = {
"倒计时关机", // 75
"关闭屏幕", // 76
"主题&颜色", // 77
"默认", // 78
"青色", // 79
"西瓜红", // 80
"珍珠白", // 81
"湖蓝", // 82
"草绿", // 83
"樱花紫", // 84
"纯白", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"不可用", // 86
"AF 不可用", // 87
"EON 不可用", // 88
@@ -3183,7 +3197,8 @@ static const char* const myLanguage[18][210] = {
"调整SPI通讯速率", // 206
"搜索灵敏度", // 207
"不可用", // 208
"Software version" // 209
"Software version", // 209
"Frequency font" // 210 ***
},
{ "Norsk", // Norwegian
@@ -3264,14 +3279,14 @@ static const char* const myLanguage[18][210] = {
"Tidsavbruddstimer", // 75
"Skjerm av", // 76
"Tema", // 77
"Standard", // 78
"Cyan", // 79 ***
"Crimson", // 80 ***
"Monochrome", // 81 ***
"Volcano", // 82 ***
"Dendro", // 83 ***
"Sakura", // 84 ***
"Whiteout", // 85 ***
"", // 78
"", // 79 ***
"", // 80 ***
"", // 81 ***
"", // 82 ***
"", // 83 ***
"", // 84 ***
"", // 85 ***
"IKKE MULIG", // 86
"Ingen AF", // 87
"Ingen EON", // 88
@@ -3395,7 +3410,8 @@ static const char* const myLanguage[18][210] = {
"Dynamisk SPI hastighet", // 206
"Skannefølsomhet", // 207
"INGEN", // 208
"Programvareversjon" // 209
"Programvareversjon", // 209
"Frequency font" // 210 ***
},
{ "Español", // Spanish
@@ -3476,14 +3492,14 @@ static const char* const myLanguage[18][210] = {
"Temporizador de\ntiempo muerto", // 75
"Apagar pantalla", // 76
"Tema", // 77
"Predeterminado", // 78
"Cian", // 79
"Carmesí", // 80
"Monocromo", // 81
"Volcán", // 82
"Dendro", // 83
"Sakura", // 84
"Blanqueo total", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"NO ES POSIBLE", // 86
"No AF disponible", // 87
"No EON disponible", // 88
@@ -3607,7 +3623,8 @@ static const char* const myLanguage[18][210] = {
"Velocidad de SPI", // 206
"Sensibilidad\ndel escaneo", // 207
"NINGUNA", // 208
"Versión del software" // 209
"Versión del software", // 209
"Frequency font" // 210 ***
},
{ "Português", // Portuguese
@@ -3688,14 +3705,14 @@ static const char* const myLanguage[18][210] = {
"Temporizador de\ndesligamento", // 75
"Desligar a tela", // 76
"Tema", // 77
"Padrão", // 78
"Ciano", // 79
"Carmesim", // 80
"Monocromático", // 81
"Vulcão", // 82
"Dendro", // 83
"Sakura", // 84
"Branco total", // 85
"", // 78
"", // 79
"", // 80
"", // 81
"", // 82
"", // 83
"", // 84
"", // 85
"NÃO POSSÍVEL", // 86
"AF não disponível", // 87
"EON não disponível", // 88
@@ -3819,7 +3836,8 @@ static const char* const myLanguage[18][210] = {
"Velocidade dinâmica\nde SPI", // 206
"Sensibilidade\nda varredura", // 207
"NENHUM", // 208
"Versão do software" // 209
"Versão do software", // 209
"Frequency font" // 210 ***
}
};
#endif