Added skin selector
This commit is contained in:
+4
-1
@@ -136,6 +136,7 @@ byte hardwaremodel = BASE_ILI9341;
|
||||
#endif
|
||||
byte hardwaremodelold;
|
||||
byte ContrastSet;
|
||||
byte CurrentSkin;
|
||||
byte CurrentTheme;
|
||||
byte displayflip;
|
||||
byte ECCold;
|
||||
@@ -181,7 +182,6 @@ byte stepsize;
|
||||
byte StereoLevel;
|
||||
byte subnetclient;
|
||||
byte TEF;
|
||||
byte theme;
|
||||
byte tot;
|
||||
byte tunemode;
|
||||
byte unit;
|
||||
@@ -457,6 +457,7 @@ void setup() {
|
||||
amscansens = EEPROM.readByte(EE_BYTE_AMSCANSENS);
|
||||
fmscansens = EEPROM.readByte(EE_BYTE_FMSCANSENS);
|
||||
freqfont = EEPROM.readByte(EE_BYTE_FREQFONT);
|
||||
CurrentSkin = EEPROM.readByte(EE_BYTE_SKIN);
|
||||
|
||||
if (spispeed == SPI_SPEED_DEFAULT) tft.setSPISpeed(SPI_FREQUENCY / 1000000); else tft.setSPISpeed(spispeed * 10);
|
||||
LWLowEdgeSet = FREQ_LW_LOW_EDGE_MIN;
|
||||
@@ -1943,6 +1944,7 @@ void ModeButtonPress() {
|
||||
EEPROM.writeByte(EE_BYTE_AMSCANSENS, amscansens);
|
||||
EEPROM.writeByte(EE_BYTE_FMSCANSENS, fmscansens);
|
||||
EEPROM.writeByte(EE_BYTE_FREQFONT, freqfont);
|
||||
EEPROM.writeByte(EE_BYTE_SKIN, CurrentSkin);
|
||||
EEPROM.commit();
|
||||
if (af == 2) radio.rds.afreg = true; else radio.rds.afreg = false;
|
||||
if (!usesquelch) radio.setUnMute();
|
||||
@@ -3570,6 +3572,7 @@ void DefaultSettings(byte userhardwaremodel) {
|
||||
EEPROM.writeByte(EE_BYTE_AMSCANSENS, 4);
|
||||
EEPROM.writeByte(EE_BYTE_FMSCANSENS, 4);
|
||||
EEPROM.writeByte(EE_BYTE_FREQFONT, 3);
|
||||
EEPROM.writeByte(EE_BYTE_SKIN, 0);
|
||||
EEPROM.commit();
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -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 822
|
||||
#define EE_TOTAL_CNT 823
|
||||
#define EE_UINT16_FREQUENCY_FM 0
|
||||
#define EE_BYTE_VOLSET 4
|
||||
#define EE_BYTE_STEREO 5
|
||||
@@ -188,10 +188,11 @@
|
||||
#define EE_BYTE_AMSCANSENS 122
|
||||
#define EE_BYTE_FMSCANSENS 123
|
||||
#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_BYTE_SKIN 125
|
||||
#define EE_PRESETS_BAND_START 126
|
||||
#define EE_PRESET_BW_START 226
|
||||
#define EE_PRESET_MS_START 326
|
||||
#define EE_PRESETS_START 426
|
||||
#define EE_PRESETS_FREQUENCY 0
|
||||
|
||||
// End of EEPROM index defines
|
||||
@@ -199,6 +200,7 @@
|
||||
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"};
|
||||
static const char* const Skin[] = {"Essential"};
|
||||
|
||||
// FM band: before BAND_GAP; AM band: after BAND_GAP
|
||||
enum RADIO_BAND {
|
||||
|
||||
+117
-94
@@ -7,7 +7,7 @@
|
||||
#include <cstring>
|
||||
|
||||
byte menuitem;
|
||||
byte items[8] = {8, static_cast<byte>(dynamicspi ? 4 : 3), 7, 10, 9, 10, 10, 5};
|
||||
byte items[8] = {8, static_cast<byte>(dynamicspi ? 5 : 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) {
|
||||
@@ -372,7 +372,7 @@ void BuildAFScreen() {
|
||||
}
|
||||
afscreen = true;
|
||||
advancedRDS = false;
|
||||
if (theme == 0) {
|
||||
if (CurrentSkin == 0) {
|
||||
tft.fillScreen(BackgroundColor);
|
||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
||||
tft.drawLine(0, 30, 320, 30, FrameColor);
|
||||
@@ -449,6 +449,7 @@ void BuildMenu() {
|
||||
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);
|
||||
tftPrint(-1, myLanguage[language][62], 8, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
switch (hardwaremodel) {
|
||||
case BASE_ILI9341: tftPrint(1, myLanguage[language][109], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
@@ -459,11 +460,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 (usesquelch) tftPrint(1, myLanguage[language][42], 310, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
|
||||
if (dynamicspi) {
|
||||
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);
|
||||
tftPrint(1, "MHz", 310, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][206], 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);
|
||||
else tftPrint(1, String(spispeed * 10, DEC), 270, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -493,38 +496,39 @@ void BuildMenu() {
|
||||
case DISPLAYSETTINGS:
|
||||
tftPrint(-1, myLanguage[language][39], 8, ITEM1 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][29], 8, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][62], 8, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][63], 8, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][77], 8, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][91], 8, ITEM6 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
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][63], 8, ITEM3 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][91], 8, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][74], 8, ITEM5 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][173], 8, ITEM6 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][98], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][78], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(-1, myLanguage[language][77], 8, ITEM9 + 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, 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 (showmodulation) tftPrint(1, myLanguage[language][42], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (screensaverset) tftPrint(1, myLanguage[language][92], 310, ITEM4 + 6, ActiveColor, ActiveColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (screensaverset) tftPrint(1, String(screensaverOptions[screensaverset], DEC), 270, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM4 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
|
||||
switch (poweroptions) {
|
||||
case LCD_OFF: tftPrint(1, myLanguage[language][76], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(1, myLanguage[language][94], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(1, myLanguage[language][95], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_BRIGHTNESS_HALF: tftPrint(1, myLanguage[language][96], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_OFF: tftPrint(1, myLanguage[language][76], 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(1, myLanguage[language][94], 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(1, myLanguage[language][95], 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case LCD_BRIGHTNESS_HALF: tftPrint(1, myLanguage[language][96], 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
}
|
||||
|
||||
switch (batteryoptions) {
|
||||
case BATTERY_NONE: tftPrint(1, myLanguage[language][30], 310, ITEM8 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case BATTERY_VALUE: tftPrint(1, myLanguage[language][174], 310, ITEM8 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case BATTERY_PERCENT: tftPrint(1, myLanguage[language][175], 310, ITEM8 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case BATTERY_NONE: tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case BATTERY_VALUE: tftPrint(1, myLanguage[language][174], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
case BATTERY_PERCENT: tftPrint(1, myLanguage[language][175], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||
}
|
||||
|
||||
tftPrint(1, unitString[unit], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, unitString[unit], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, Skin[CurrentSkin], 310, ITEM8 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, Theme[CurrentTheme], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, FreqFont[freqfont], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
break;
|
||||
|
||||
@@ -669,7 +673,7 @@ void BuildAdvancedRDS() {
|
||||
afpagenr = 1;
|
||||
advancedRDS = true;
|
||||
ScreensaverTimerSet(OFF);
|
||||
if (theme == 0) {
|
||||
if (CurrentSkin == 0) {
|
||||
tft.fillScreen(BackgroundColor);
|
||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
||||
tft.drawLine(0, 30, 320, 30, FrameColor);
|
||||
@@ -798,7 +802,7 @@ void BuildDisplay() {
|
||||
afscreen = false;
|
||||
advancedRDS = false;
|
||||
int bandColor;
|
||||
if (theme == 0) {
|
||||
if (CurrentSkin == 0) {
|
||||
tft.fillScreen(BackgroundColor);
|
||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
||||
tft.drawLine(0, 30, 320, 30, FrameColor);
|
||||
@@ -990,6 +994,12 @@ void MenuUp() {
|
||||
break;
|
||||
|
||||
case ITEM4:
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (usesquelch) usesquelch = false; else usesquelch = true;
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM5:
|
||||
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);
|
||||
|
||||
@@ -1092,28 +1102,12 @@ void MenuUp() {
|
||||
break;
|
||||
|
||||
case ITEM3:
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (usesquelch) usesquelch = false; else usesquelch = true;
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM4:
|
||||
if (showmodulation) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (showmodulation) showmodulation = false; else showmodulation = true;
|
||||
if (showmodulation) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM5:
|
||||
CurrentTheme ++;
|
||||
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, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM6:
|
||||
case ITEM4:
|
||||
if (screensaverset) tftPrint(-1, myLanguage[language][92], 170, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (!screensaverset) tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(1, String(screensaverOptions[screensaverset]), 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
screensaverset ++;
|
||||
@@ -1122,7 +1116,7 @@ void MenuUp() {
|
||||
if (!screensaverset) tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(screensaverOptions[screensaverset]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM7:
|
||||
case ITEM5:
|
||||
switch (poweroptionsold) {
|
||||
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
@@ -1142,7 +1136,7 @@ void MenuUp() {
|
||||
poweroptionsold = poweroptions;
|
||||
break;
|
||||
|
||||
case ITEM8:
|
||||
case ITEM6:
|
||||
switch (batteryoptionsold) {
|
||||
case BATTERY_NONE: tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
case BATTERY_VALUE: tftPrint(0, myLanguage[language][174], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
@@ -1160,18 +1154,35 @@ void MenuUp() {
|
||||
batteryoptionsold = batteryoptions;
|
||||
break;
|
||||
|
||||
case ITEM9:
|
||||
tftPrint(0, String(unitString[unit]), 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
case ITEM7:
|
||||
tftPrint(0, unitString[unit], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
unit ++;
|
||||
if (unit > 2) unit = 0;
|
||||
tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (unit > sizeof(unitString) / sizeof(unitString[0]) - 1) unit = 0;
|
||||
tftPrint(0, unitString[unit], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM8:
|
||||
tftPrint(0, Skin[CurrentSkin], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
CurrentSkin ++;
|
||||
if (CurrentSkin > sizeof(Skin) / sizeof(Skin[0]) - 1) CurrentSkin = 0;
|
||||
tftPrint(0, Skin[CurrentSkin], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM9:
|
||||
CurrentTheme ++;
|
||||
if (CurrentTheme > sizeof(Theme) / sizeof(Theme[0]) - 1) 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, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM10:
|
||||
tftPrint(0, String(FreqFont[freqfont]), 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
tftPrint(0, FreqFont[freqfont], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
freqfont ++;
|
||||
if (freqfont > 4) freqfont = 0;
|
||||
tftPrint(0, String(FreqFont[freqfont]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (freqfont > sizeof(FreqFont) / sizeof(FreqFont[0]) - 1) freqfont = 0;
|
||||
tftPrint(0, FreqFont[freqfont], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1574,6 +1585,12 @@ void MenuDown() {
|
||||
break;
|
||||
|
||||
case ITEM4:
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (usesquelch) usesquelch = false; else usesquelch = true;
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM5:
|
||||
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);
|
||||
|
||||
@@ -1677,28 +1694,12 @@ void MenuDown() {
|
||||
break;
|
||||
|
||||
case ITEM3:
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (usesquelch) usesquelch = false; else usesquelch = true;
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM4:
|
||||
if (showmodulation) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (showmodulation) showmodulation = false; else showmodulation = true;
|
||||
if (showmodulation) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM5:
|
||||
CurrentTheme --;
|
||||
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, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM6:
|
||||
case ITEM4:
|
||||
if (screensaverset) tftPrint(-1, myLanguage[language][92], 170, 118, BackgroundColor, BackgroundColor, 28);
|
||||
if (!screensaverset) tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(1, String(screensaverOptions[screensaverset]), 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
screensaverset --;
|
||||
@@ -1707,7 +1708,7 @@ void MenuDown() {
|
||||
if (!screensaverset) tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(screensaverOptions[screensaverset]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM7:
|
||||
case ITEM5:
|
||||
switch (poweroptionsold) {
|
||||
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
@@ -1727,7 +1728,7 @@ void MenuDown() {
|
||||
poweroptionsold = poweroptions;
|
||||
break;
|
||||
|
||||
case ITEM8:
|
||||
case ITEM6:
|
||||
switch (batteryoptionsold) {
|
||||
case BATTERY_NONE: tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
case BATTERY_VALUE: tftPrint(0, myLanguage[language][174], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||
@@ -1745,18 +1746,35 @@ void MenuDown() {
|
||||
batteryoptionsold = batteryoptions;
|
||||
break;
|
||||
|
||||
case ITEM9:
|
||||
tftPrint(0, String(unitString[unit]), 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
case ITEM7:
|
||||
tftPrint(0, unitString[unit], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
unit --;
|
||||
if (unit > 2) unit = 2;
|
||||
tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (unit > sizeof(unitString) / sizeof(unitString[0]) - 1) unit = sizeof(unitString) / sizeof(unitString[0]) - 1;
|
||||
tftPrint(0, unitString[unit], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM8:
|
||||
tftPrint(0, Skin[CurrentSkin], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
CurrentSkin --;
|
||||
if (CurrentSkin > sizeof(Skin) / sizeof(Skin[0]) - 1) CurrentSkin = sizeof(Skin) / sizeof(Skin[0]) - 1;
|
||||
tftPrint(0, Skin[CurrentSkin], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM9:
|
||||
CurrentTheme --;
|
||||
if (CurrentTheme > sizeof(Theme) / sizeof(Theme[0]) - 1) CurrentTheme = sizeof(Theme) / sizeof(Theme[0]) - 1;
|
||||
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, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM10:
|
||||
tftPrint(0, String(FreqFont[freqfont]), 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
tftPrint(0, FreqFont[freqfont], 155, 118, BackgroundColor, BackgroundColor, 28);
|
||||
freqfont --;
|
||||
if (freqfont > 4) freqfont = 4;
|
||||
tftPrint(0, String(FreqFont[freqfont]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (freqfont > sizeof(FreqFont) / sizeof(FreqFont[0]) - 1) freqfont = sizeof(FreqFont) / sizeof(FreqFont[0]) - 1;
|
||||
tftPrint(0, FreqFont[freqfont], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -2211,6 +2229,11 @@ void DoMenu() {
|
||||
break;
|
||||
|
||||
case ITEM4:
|
||||
Infoboxprint(myLanguage[language][62]);
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM5:
|
||||
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);
|
||||
@@ -2276,27 +2299,17 @@ void DoMenu() {
|
||||
break;
|
||||
|
||||
case ITEM3:
|
||||
Infoboxprint(myLanguage[language][62]);
|
||||
if (usesquelch) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM4:
|
||||
Infoboxprint(myLanguage[language][63]);
|
||||
if (showmodulation) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM5:
|
||||
Infoboxprint(myLanguage[language][77]);
|
||||
tftPrint(0, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM6:
|
||||
case ITEM4:
|
||||
Infoboxprint(myLanguage[language][91]);
|
||||
if (screensaverset) tftPrint(-1, myLanguage[language][92], 170, 118, ActiveColor, ActiveColorSmooth, 28);
|
||||
if (!screensaverset) tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(1, String(screensaverOptions[screensaverset], DEC), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM7:
|
||||
case ITEM5:
|
||||
Infoboxprint(myLanguage[language][74]);
|
||||
switch (poweroptions) {
|
||||
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||
@@ -2307,7 +2320,7 @@ void DoMenu() {
|
||||
poweroptionsold = poweroptions;
|
||||
break;
|
||||
|
||||
case ITEM8:
|
||||
case ITEM6:
|
||||
Infoboxprint(myLanguage[language][173]);
|
||||
switch (batteryoptions) {
|
||||
case BATTERY_NONE: tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||
@@ -2317,11 +2330,21 @@ void DoMenu() {
|
||||
batteryoptionsold = batteryoptions;
|
||||
break;
|
||||
|
||||
case ITEM9:
|
||||
case ITEM7:
|
||||
Infoboxprint(myLanguage[language][98]);
|
||||
tftPrint(0, unitString[unit], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM8:
|
||||
Infoboxprint(myLanguage[language][78]);
|
||||
tftPrint(0, Skin[CurrentSkin], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM9:
|
||||
Infoboxprint(myLanguage[language][77]);
|
||||
tftPrint(0, Theme[CurrentTheme], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
break;
|
||||
|
||||
case ITEM10:
|
||||
Infoboxprint(myLanguage[language][210]);
|
||||
tftPrint(0, FreqFont[freqfont], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
|
||||
@@ -73,6 +73,7 @@ extern byte batteryold;
|
||||
extern byte batteryoptions;
|
||||
extern byte batteryoptionsold;
|
||||
extern byte ContrastSet;
|
||||
extern byte CurrentSkin;
|
||||
extern byte CurrentTheme;
|
||||
extern byte ECCold;
|
||||
extern byte fmscansens;
|
||||
@@ -107,7 +108,6 @@ extern byte StereoLevel;
|
||||
extern byte StereoLevel;
|
||||
extern byte submenu;
|
||||
extern byte subnetclient;
|
||||
extern byte theme;
|
||||
extern byte tot;
|
||||
extern byte touchrotating;
|
||||
extern byte unit;
|
||||
|
||||
+18
-18
@@ -84,7 +84,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Time-out timer", // 75
|
||||
"Screen off", // 76
|
||||
"Theme", // 77
|
||||
"", // 78
|
||||
"Skin", // 78
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -297,7 +297,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Auto uitschakelen", // 75
|
||||
"Scherm uit", // 76
|
||||
"Thema", // 77
|
||||
"", // 78
|
||||
"Uiterlijk", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -510,7 +510,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Wyłącznik czasowy", // 75
|
||||
"Wyłącz ekran", // 76
|
||||
"Motyw", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -723,7 +723,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Time-out timer", // 75 ***
|
||||
"Zaslon isključiti", // 76
|
||||
"Tema dizajna", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -936,7 +936,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Χρονοδιακόπτης λήξης", // 75
|
||||
"Οθόνη σβηστή", // 76
|
||||
"Θέμα", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -1149,7 +1149,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Intervalul de timp", // 75
|
||||
"Ecran oprit", // 76
|
||||
"Teme", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -1362,7 +1362,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Abschaltzeit", // 75
|
||||
"Bildschirm aus", // 76
|
||||
"Thema", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -1575,7 +1575,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Čas", // 75
|
||||
"Vypnutí obrazovky", // 76
|
||||
"Vzhled", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -1788,7 +1788,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Čas", // 75
|
||||
"Vypnutie obrazovky", // 76
|
||||
"Vzhľad", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -2001,7 +2001,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Temporisateur", // 75
|
||||
"Affichage éteint", // 76
|
||||
"Thème", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -2214,7 +2214,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Time-out timer", // 75 ***
|
||||
"Изключен дисплей", // 76
|
||||
"Тема", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80 ***
|
||||
"", // 81
|
||||
@@ -2427,7 +2427,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Глубокий сон", // 75
|
||||
"Погасить экран", // 76
|
||||
"Тема", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -2640,7 +2640,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Таймер тайм-ауту", // 75
|
||||
"Екран вимкнено", // 76
|
||||
"Тема", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -2853,7 +2853,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Timer di time-out", // 75 ***
|
||||
"Schermo spento", // 76
|
||||
"Motivo schermo", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -3066,7 +3066,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"倒计时关机", // 75
|
||||
"关闭屏幕", // 76
|
||||
"主题&颜色", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -3279,7 +3279,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Tidsavbruddstimer", // 75
|
||||
"Skjerm av", // 76
|
||||
"Tema", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79 ***
|
||||
"", // 80 ***
|
||||
"", // 81 ***
|
||||
@@ -3492,7 +3492,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Temporizador de\ntiempo muerto", // 75
|
||||
"Apagar pantalla", // 76
|
||||
"Tema", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
@@ -3705,7 +3705,7 @@ static const char* const myLanguage[18][211] = {
|
||||
"Temporizador de\ndesligamento", // 75
|
||||
"Desligar a tela", // 76
|
||||
"Tema", // 77
|
||||
"", // 78
|
||||
"Skin", // 78 ***
|
||||
"", // 79
|
||||
"", // 80
|
||||
"", // 81
|
||||
|
||||
Reference in New Issue
Block a user