Versioning and small fix in language

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-01-01 22:06:48 +01:00
parent 665d025a67
commit 58e87b615a
4 changed files with 89 additions and 28 deletions
+43
View File
@@ -0,0 +1,43 @@
//MAIN COLORS /* RGB 565 CODES */
#define Black 0x0000 /* 0, 0, 0 */
#define Blue 0x001F /* 0, 0, 31 */
#define Crimson 0xF8C3 /* 31, 6, 3 */
#define Cyan 0x0F3F /* 1, 57, 31 */
#define Grey 0x7BEF /* 15, 31, 15 */
#define Darkgrey 0x39A7 /* 7, 13, 7 */
#define Green 0x07E0 /* 0, 63, 0 */
#define Indigo 0x881F /* 17, 0, 31 */
#define Ocean 0x01FF /* 0, 15, 31 */
#define Orange 0xFC00 /* 31, 32, 0 */
#define Red 0xF800 /* 31, 0, 0 */
#define Sakura 0xF3D5 /* 30, 30, 21 */
#define Turquoise 0x07FF /* 0, 63, 31 */
#define Skyblue 0x867D /* 16, 51, 29 */
#define Tangerine 0xF980 /* 31, 12, 0 */
#define Teal 0x07F7 /* 0, 63, 23 */
#define White 0xFFFF /* 31, 63, 31 */
#define Yellow 0xFFE0 /* 31, 63, 0 */
//SMOOTH COLORS /* RGB 565 CODES */
#define CrimsonSmooth 0x3800 /* 7, 0, 0 */
#define CyanSmooth 0x0105 /* 0, 8, 5 */
#define GreenSmooth 0x00C0 /* 0, 6, 0 */
#define IndigoSmooth 0x3080 /* 4, 0, 7 */
#define OceanSmooth 0x0006 /* 0, 0, 6 */
#define OrangeSmooth 0x3165 /* 6, 11, 5 */
#define RedSmooth 0x2000 /* 4, 0, 0 */
#define SakuraSmooth 0x3008 /* 6, 0, 8 */
#define SkyblueSmooth 0x10E4 /* 2, 7, 4 */
#define TangerineSmooth 0x3080 /* 6, 4, 0 */
#define TealSmooth 0x0144 /* 0, 10, 4 */
#define WhiteSmooth 0x18E3 /* 3, 7, 3 */
#define YellowSmooth 0x2120 /* 4, 9, 0 */
//DARK COLORS /* RGB 565 CODES */
#define CyanDark 0x5BAF /* 11, 29, 15 */
#define CrimsonDark 0x6A08 /* 13, 16, 8 */
#define CyanGrey 0x2A08 /* 5, 16, 8 */
#define PaleGrey 0x4A69 /* 9, 19, 9 */
#define PureGrey 0x7BCF /* 15, 30, 15 */
#define CrimsonDarkSmooth 0x30E3 /* 6, 7, 3 */
#define CyanDarkSmooth 0x29E8 /* 5, 15, 8 */
#define CyanFrame 0x01E9 /* 0, 15, 9 */
#define CrimsonDarkBW 0xFBEF /* 31, 31, 15 */
+1 -1
View File
@@ -107,7 +107,7 @@
// EEPROM index defines // EEPROM index defines
#define EE_PRESETS_CNT 99 #define EE_PRESETS_CNT 99
#define EE_CHECKBYTE_VALUE 3 // 0 ~ 255,add new entry, change for new value #define EE_CHECKBYTE_VALUE 2 // 0 ~ 255,add new entry, change for new value
#define EE_TOTAL_CNT 823 #define EE_TOTAL_CNT 823
#define EE_UINT16_FREQUENCY_FM 0 #define EE_UINT16_FREQUENCY_FM 0
+7 -7
View File
@@ -9,7 +9,7 @@
byte menuitem; byte menuitem;
byte items[8] = {8, static_cast<byte>(dynamicspi ? 5 : 3), 7, 10, 9, 10, 10, 5}; byte items[8] = {8, static_cast<byte>(dynamicspi ? 5 : 4), 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/ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de/online/rgb565-color-picker/
switch (CurrentTheme) { switch (CurrentTheme) {
@@ -492,7 +492,7 @@ void BuildMenu() {
if (dynamicspi) { if (dynamicspi) {
tftPrint(1, "MHz", 310, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "MHz", 310, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][81], 8, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][81], 8, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16);
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 270, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 270, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16);
else tftPrint(1, String(spispeed * 10, DEC), 270, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, String(spispeed * 10, DEC), 270, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16);
} }
break; break;
@@ -1027,13 +1027,13 @@ void MenuUp() {
break; break;
case ITEM5: case ITEM5:
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
spispeed++; spispeed++;
if (spispeed > SPI_SPEED_COUNT - 1) spispeed = 0; if (spispeed > SPI_SPEED_COUNT - 1) spispeed = 0;
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(spispeed * 10, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
if (spispeed == SPI_SPEED_DEFAULT) tft.setSPISpeed(SPI_FREQUENCY / 1000000); else tft.setSPISpeed(spispeed * 10); if (spispeed == SPI_SPEED_DEFAULT) tft.setSPISpeed(SPI_FREQUENCY / 1000000); else tft.setSPISpeed(spispeed * 10);
@@ -1618,13 +1618,13 @@ void MenuDown() {
break; break;
case ITEM5: case ITEM5:
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(1, String(spispeed * 10, DEC), 155, 118, BackgroundColor, BackgroundColor, 28);
spispeed--; spispeed--;
if (spispeed > SPI_SPEED_COUNT - 1) spispeed = SPI_SPEED_COUNT - 1; if (spispeed > SPI_SPEED_COUNT - 1) spispeed = SPI_SPEED_COUNT - 1;
if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][78]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
else tftPrint(1, String(spispeed * 10, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(spispeed * 10, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
if (spispeed == SPI_SPEED_DEFAULT) tft.setSPISpeed(SPI_FREQUENCY / 1000000); else tft.setSPISpeed(spispeed * 10); if (spispeed == SPI_SPEED_DEFAULT) tft.setSPISpeed(SPI_FREQUENCY / 1000000); else tft.setSPISpeed(spispeed * 10);
@@ -2263,7 +2263,7 @@ void DoMenu() {
case ITEM5: case ITEM5:
Infoboxprint(myLanguage[language][81]); Infoboxprint(myLanguage[language][81]);
tftPrint(-1, "MHz", 170, 118, ActiveColor, ActiveColorSmooth, 28); 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); if (spispeed == SPI_SPEED_DEFAULT) tftPrint(1, String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(spispeed * 10 , DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break; break;
} }
break; break;
+38 -20
View File
@@ -5,7 +5,7 @@
// [number of languages][number of texts] // [number of languages][number of texts]
// *** means the text is the same as in English // *** means the text is the same as in English
static const char* const myLanguage[18][211] = { static const char* const myLanguage[18][205] = {
{ "English", // English { "English", // English
"Rotary direction changed", // 1 "Rotary direction changed", // 1
"Please release button", // 2 "Please release button", // 2
@@ -209,7 +209,8 @@ static const char* const myLanguage[18][211] = {
"Small", // 200 "Small", // 200
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS" // 203 "Fast PS", // 203
"Default" // 204
}, },
{ "Nederlands", // Dutch { "Nederlands", // Dutch
@@ -415,7 +416,8 @@ static const char* const myLanguage[18][211] = {
"Laag", // 200 "Laag", // 200
"Middel", // 201 "Middel", // 201
"Alles", // 202 "Alles", // 202
"Snelle PS" // 203 "Snelle PS", // 203
"Standaard" // 204
}, },
{ "Polski", // Polish { "Polski", // Polish
@@ -621,7 +623,8 @@ static const char* const myLanguage[18][211] = {
"Małe", // 200 "Małe", // 200
"Duże", // 201 "Duże", // 201
"Wszystkie", // 202 "Wszystkie", // 202
"Szybki PS" // 203 "Szybki PS", // 203
"Default" // 204
}, },
{ "Hrvatski", // Croatian { "Hrvatski", // Croatian
@@ -827,7 +830,8 @@ static const char* const myLanguage[18][211] = {
"Malo", // 200 "Malo", // 200
"Veliko", // 201 "Veliko", // 201
"Sve", // 202 "Sve", // 202
"Brzi PS" // 203 "Brzi PS", // 203
"Default" // 204
}, },
{ "Ελληνικά", // Greek { "Ελληνικά", // Greek
@@ -1033,7 +1037,8 @@ static const char* const myLanguage[18][211] = {
"Μικρό", // 200 "Μικρό", // 200
"Μεγάλο", // 201 "Μεγάλο", // 201
"Όλα", // 202 "Όλα", // 202
"Γρήγορο PS" // 203 "Γρήγορο PS", // 203
"Default" // 204
}, },
{ "Română", // Romanian { "Română", // Romanian
@@ -1239,7 +1244,8 @@ static const char* const myLanguage[18][211] = {
"Mic", // 200 "Mic", // 200
"Mare", // 201 "Mare", // 201
"Toate", // 202 "Toate", // 202
"PS rapid" // 203 "PS rapid", // 203
"Default" // 204
}, },
{ "Deutsch", // German { "Deutsch", // German
@@ -1445,7 +1451,8 @@ static const char* const myLanguage[18][211] = {
"Wenig", // 200 "Wenig", // 200
"Viel", // 201 "Viel", // 201
"Maximal", // 202 "Maximal", // 202
"Schnelles PS" // 203 "Schnelles PS", // 203
"Default" // 204
}, },
{ "Český", // Czech { "Český", // Czech
@@ -1651,7 +1658,8 @@ static const char* const myLanguage[18][211] = {
"Malý", // 200 "Malý", // 200
"Velký", // 201 "Velký", // 201
"Vše", // 202 "Vše", // 202
"Rychlé načtení PS" // 203 "Rychlé načtení PS", // 203
"Default" // 204
}, },
{ "Slovenský", // Slovak { "Slovenský", // Slovak
@@ -1857,7 +1865,8 @@ static const char* const myLanguage[18][211] = {
"Malý", // 200 "Malý", // 200
"Veľký", // 201 "Veľký", // 201
"Všetko", // 202 "Všetko", // 202
"Rýchle načítanie PS" // 203 "Rýchle načítanie PS", // 203
"Default" // 204
}, },
{ "Français", // French { "Français", // French
@@ -2063,7 +2072,8 @@ static const char* const myLanguage[18][211] = {
"Petites", // 200 "Petites", // 200
"Grosses", // 201 "Grosses", // 201
"Toutes", // 202 "Toutes", // 202
"PS rapide" // 203 "PS rapide", // 203
"Default" // 204
}, },
{ "Български", // Bulgarian { "Български", // Bulgarian
@@ -2269,7 +2279,8 @@ static const char* const myLanguage[18][211] = {
"Small", // 200 *** "Small", // 200 ***
"Large", // 201 *** "Large", // 201 ***
"Всички", // 202 "Всички", // 202
"Fast PS" // 203 *** "Fast PS", // 203 ***
"Default" // 204
}, },
{ "Русский", // Russian { "Русский", // Russian
@@ -2475,7 +2486,8 @@ static const char* const myLanguage[18][211] = {
"Мало", // 200 "Мало", // 200
"Больше", // 201 "Больше", // 201
"Все", // 202 "Все", // 202
"Быстрый PS" // 203 "Быстрый PS", // 203
"Default" // 204
}, },
{ "Українська", // Ukranian { "Українська", // Ukranian
@@ -2681,7 +2693,8 @@ static const char* const myLanguage[18][211] = {
"Мало", // 200 "Мало", // 200
"Багато", // 201 "Багато", // 201
"Усе", // 202 "Усе", // 202
"Швидкий PS" // 203 "Швидкий PS", // 203
"Default" // 204
}, },
{ "Italiano", // Italian { "Italiano", // Italian
@@ -2887,7 +2900,8 @@ static const char* const myLanguage[18][211] = {
"Piccolo", // 200 *** "Piccolo", // 200 ***
"Grande", // 201 *** "Grande", // 201 ***
"Tutto", // 202 *** "Tutto", // 202 ***
"PS veloce" // 203 *** "PS veloce", // 203 ***
"Default" // 204
}, },
{ "Simplified Chinese", // Simplified Chinese { "Simplified Chinese", // Simplified Chinese
@@ -3093,7 +3107,8 @@ static const char* const myLanguage[18][211] = {
"少量", // 200 "少量", // 200
"大量", // 201 "大量", // 201
"全部", // 202 "全部", // 202
"快速 PS" // 203 "快速 PS", // 203
"Default" // 204
}, },
{ "Norsk", // Norwegian { "Norsk", // Norwegian
@@ -3299,7 +3314,8 @@ static const char* const myLanguage[18][211] = {
"Lite", // 200 "Lite", // 200
"Mye", // 201 "Mye", // 201
"Alt", // 202 "Alt", // 202
"Rask PS" // 203 "Rask PS", // 203
"Default" // 204
}, },
{ "Español", // Spanish { "Español", // Spanish
@@ -3505,7 +3521,8 @@ static const char* const myLanguage[18][211] = {
"Pequeño", // 200 "Pequeño", // 200
"Grande", // 201 "Grande", // 201
"Todo", // 202 "Todo", // 202
"PS rápido" // 203 "PS rápido", // 203
"Default" // 204
}, },
{ "Português", // Portuguese { "Português", // Portuguese
@@ -3711,7 +3728,8 @@ static const char* const myLanguage[18][211] = {
"Pequeno", // 200 "Pequeno", // 200
"Grande", // 201 "Grande", // 201
"Tudo", // 202 "Tudo", // 202
"PS rápido" // 203 "PS rápido", // 203
"Default" // 204
} }
}; };
#endif #endif