More UI changes and themes optimization
This commit is contained in:
+41
-19
@@ -169,6 +169,8 @@ int AMLevelOffset;
|
|||||||
int BackgroundColor;
|
int BackgroundColor;
|
||||||
int BarSignificantColor;
|
int BarSignificantColor;
|
||||||
int BarInsignificantColor;
|
int BarInsignificantColor;
|
||||||
|
int BatteryValueColor;
|
||||||
|
int BatteryValueColorSmooth;
|
||||||
int batupdatetimer;
|
int batupdatetimer;
|
||||||
int BWAutoColor;
|
int BWAutoColor;
|
||||||
int BWAutoColorSmooth;
|
int BWAutoColorSmooth;
|
||||||
@@ -1829,14 +1831,14 @@ void ModeButtonPress() {
|
|||||||
Serial.end();
|
Serial.end();
|
||||||
if (wifi) remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
|
if (wifi) remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
|
||||||
if (USBmode) Serial.begin(19200); else Serial.begin(115200);
|
if (USBmode) Serial.begin(19200); else Serial.begin(115200);
|
||||||
|
ScreensaverTimerSet(screensaverOptions[screensaverset]);
|
||||||
|
if (screensaverset) ScreensaverTimerRestart();
|
||||||
doBandSelectionFM();
|
doBandSelectionFM();
|
||||||
doBandSelectionAM();
|
doBandSelectionAM();
|
||||||
if (touchrotating) {
|
if (touchrotating) {
|
||||||
if (poweroptions != LCD_OFF) poweroptions = LCD_OFF;
|
if (poweroptions != LCD_OFF) poweroptions = LCD_OFF;
|
||||||
if (!screensaverset) screensaverset = 1;
|
if (!screensaverset) screensaverset = 1;
|
||||||
}
|
}
|
||||||
ScreensaverTimerSet(screensaverOptions[screensaverset]);
|
|
||||||
if (screensaverset) ScreensaverTimerRestart();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (digitalRead(MODEBUTTON) == LOW) delay(50);
|
while (digitalRead(MODEBUTTON) == LOW) delay(50);
|
||||||
@@ -2105,7 +2107,7 @@ void KeyDown() {
|
|||||||
|
|
||||||
void ShowMemoryPos() {
|
void ShowMemoryPos() {
|
||||||
if (tunemode == TUNE_MEM) {
|
if (tunemode == TUNE_MEM) {
|
||||||
if (advancedRDS) tftReplace(-1, String(memoryposold + 1), String(memorypos + 1), 215, 36, SecondaryColor, SecondaryColorSmooth, FONT16); else tftReplace(-1, String(memoryposold + 1), String(memorypos + 1), 50, 32, SecondaryColor, SecondaryColorSmooth, FONT16);
|
if (advancedRDS) tftReplace(-1, String(memoryposold + 1), String(memorypos + 1), 215, 36, SecondaryColor, SecondaryColorSmooth, FONT16); else tftReplace(-1, String(memoryposold + 1), String(memorypos + 1), 50, 32, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
memoryposold = memorypos;
|
memoryposold = memorypos;
|
||||||
} else {
|
} else {
|
||||||
if (advancedRDS) tftPrint(-1, String(memorypos + 1), 215, 36, BackgroundColor, BackgroundColor, FONT16); else tftPrint(-1, String(memorypos + 1), 50, 32, BackgroundColor, BackgroundColor, FONT16);
|
if (advancedRDS) tftPrint(-1, String(memorypos + 1), 215, 36, BackgroundColor, BackgroundColor, FONT16); else tftPrint(-1, String(memorypos + 1), 50, 32, BackgroundColor, BackgroundColor, FONT16);
|
||||||
@@ -3315,7 +3317,7 @@ void updateSWMIBand() {
|
|||||||
case SW_MI_BAND_90M:
|
case SW_MI_BAND_90M:
|
||||||
case SW_MI_BAND_120M:
|
case SW_MI_BAND_120M:
|
||||||
case SW_MI_BAND_160M:
|
case SW_MI_BAND_160M:
|
||||||
tftReplace(-1, SWMIBandstringold, SWMIBandstring, 50, 51, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftReplace(-1, SWMIBandstringold, SWMIBandstring, 50, 51, SecondaryColor, SecondaryColorSmooth, FONT16);
|
||||||
if (!SWMIBandstring.equals(SWMIBandstringold)) SWMIBandstringold = SWMIBandstring;
|
if (!SWMIBandstring.equals(SWMIBandstringold)) SWMIBandstringold = SWMIBandstring;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -3575,8 +3577,8 @@ void ShowBattery() {
|
|||||||
|
|
||||||
tftPrint(-1, String(batteryVold, 1), 213, 163, BackgroundColor, BackgroundColor, FONT16);
|
tftPrint(-1, String(batteryVold, 1), 213, 163, BackgroundColor, BackgroundColor, FONT16);
|
||||||
|
|
||||||
tftPrint(-1, String(batteryV, 1), 213, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, String(batteryV, 1), 213, 163, BatteryValueColor, BatteryValueColorSmooth, FONT16);
|
||||||
tftPrint(-1, "V", 232, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, "V", 232, 163, BatteryValueColor, BatteryValueColorSmooth, FONT16);
|
||||||
batteryVold = batteryV;
|
batteryVold = batteryV;
|
||||||
} else if (batteryoptions == BATTERY_PERCENT) {
|
} else if (batteryoptions == BATTERY_PERCENT) {
|
||||||
float vPer = 0.0;
|
float vPer = 0.0;
|
||||||
@@ -3586,7 +3588,7 @@ void ShowBattery() {
|
|||||||
|
|
||||||
vPer = (batteryV - BATTERY_LOW_VALUE) / (BATTERY_FULL_VALUE - BATTERY_LOW_VALUE);
|
vPer = (batteryV - BATTERY_LOW_VALUE) / (BATTERY_FULL_VALUE - BATTERY_LOW_VALUE);
|
||||||
if (vPer >= 1) vPer = 1;
|
if (vPer >= 1) vPer = 1;
|
||||||
tftPrint(-1, String(vPer * 100, 0), 213, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, String(vPer * 100, 0), 213, 163, BatteryValueColor, BatteryValueColorSmooth, FONT16);
|
||||||
tftPrint(-1, "%", 230, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, "%", 230, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
batteryPold = batteryV;
|
batteryPold = batteryV;
|
||||||
}
|
}
|
||||||
@@ -4358,6 +4360,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = TFT_GREEN;
|
BarInsignificantColor = TFT_GREEN;
|
||||||
BWAutoColor = 0x07F7;
|
BWAutoColor = 0x07F7;
|
||||||
BWAutoColorSmooth = 0x0144;
|
BWAutoColorSmooth = 0x0144;
|
||||||
|
BatteryValueColor = 0x07F7;
|
||||||
|
BatteryValueColorSmooth = 0x0144;
|
||||||
CurrentThemeString = myLanguage[language][78];
|
CurrentThemeString = myLanguage[language][78];
|
||||||
break;
|
break;
|
||||||
case 1: // Cyan theme
|
case 1: // Cyan theme
|
||||||
@@ -4367,7 +4371,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
SecondaryColorSmooth = 0x10E4;
|
SecondaryColorSmooth = 0x10E4;
|
||||||
FrequencyColor = 0x0F3F;
|
FrequencyColor = 0x0F3F;
|
||||||
FrameColor = 0x01e9;
|
FrameColor = 0x01e9;
|
||||||
GreyoutColor = 0x4A69;
|
GreyoutColor = 0x2A08;
|
||||||
BackgroundColor = TFT_BLACK;
|
BackgroundColor = TFT_BLACK;
|
||||||
ActiveColor = TFT_WHITE;
|
ActiveColor = TFT_WHITE;
|
||||||
ActiveColorSmooth = 0x18E3;
|
ActiveColorSmooth = 0x18E3;
|
||||||
@@ -4383,6 +4387,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = 0x0F3F;
|
BarInsignificantColor = 0x0F3F;
|
||||||
BWAutoColor = 0x07F7;
|
BWAutoColor = 0x07F7;
|
||||||
BWAutoColorSmooth = 0x0144;
|
BWAutoColorSmooth = 0x0144;
|
||||||
|
BatteryValueColor = 0x07F7;
|
||||||
|
BatteryValueColorSmooth = 0x0144;
|
||||||
CurrentThemeString = myLanguage[language][79];
|
CurrentThemeString = myLanguage[language][79];
|
||||||
break;
|
break;
|
||||||
case 2: // Crimson theme
|
case 2: // Crimson theme
|
||||||
@@ -4408,6 +4414,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = 0xF8C3;
|
BarInsignificantColor = 0xF8C3;
|
||||||
BWAutoColor = 0x07F7;
|
BWAutoColor = 0x07F7;
|
||||||
BWAutoColorSmooth = 0x0144;
|
BWAutoColorSmooth = 0x0144;
|
||||||
|
BatteryValueColor = 0x07F7;
|
||||||
|
BatteryValueColorSmooth = 0x0144;
|
||||||
CurrentThemeString = myLanguage[language][80];
|
CurrentThemeString = myLanguage[language][80];
|
||||||
break;
|
break;
|
||||||
case 3: // Monochrome theme
|
case 3: // Monochrome theme
|
||||||
@@ -4433,6 +4441,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = TFT_GREEN;
|
BarInsignificantColor = TFT_GREEN;
|
||||||
BWAutoColor = 0x7BCF;
|
BWAutoColor = 0x7BCF;
|
||||||
BWAutoColorSmooth = 0x1082;
|
BWAutoColorSmooth = 0x1082;
|
||||||
|
BatteryValueColor = TFT_WHITE;
|
||||||
|
BatteryValueColorSmooth = TFT_BLACK;
|
||||||
CurrentThemeString = myLanguage[language][81];
|
CurrentThemeString = myLanguage[language][81];
|
||||||
break;
|
break;
|
||||||
case 4: // Volcano theme
|
case 4: // Volcano theme
|
||||||
@@ -4458,6 +4468,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = TFT_ORANGE;
|
BarInsignificantColor = TFT_ORANGE;
|
||||||
BWAutoColor = 0x07F7;
|
BWAutoColor = 0x07F7;
|
||||||
BWAutoColorSmooth = 0x0144;
|
BWAutoColorSmooth = 0x0144;
|
||||||
|
BatteryValueColor = 0x07F7;
|
||||||
|
BatteryValueColorSmooth = 0x0144;
|
||||||
CurrentThemeString = myLanguage[language][82];
|
CurrentThemeString = myLanguage[language][82];
|
||||||
break;
|
break;
|
||||||
case 5: // Dendro theme
|
case 5: // Dendro theme
|
||||||
@@ -4492,7 +4504,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
SecondaryColorSmooth = 0x10E4;
|
SecondaryColorSmooth = 0x10E4;
|
||||||
FrequencyColor = 0xF3D5;
|
FrequencyColor = 0xF3D5;
|
||||||
FrameColor = 0x3845;
|
FrameColor = 0x3845;
|
||||||
GreyoutColor = 0x4A69;
|
GreyoutColor = 0x38C5;
|
||||||
BackgroundColor = TFT_BLACK;
|
BackgroundColor = TFT_BLACK;
|
||||||
ActiveColor = TFT_WHITE;
|
ActiveColor = TFT_WHITE;
|
||||||
ActiveColorSmooth = 0x18E3;
|
ActiveColorSmooth = 0x18E3;
|
||||||
@@ -4508,13 +4520,15 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = 0xF3D5;
|
BarInsignificantColor = 0xF3D5;
|
||||||
BWAutoColor = 0xF00A;
|
BWAutoColor = 0xF00A;
|
||||||
BWAutoColorSmooth = 0x2802;
|
BWAutoColorSmooth = 0x2802;
|
||||||
|
BatteryValueColor = 0xF00A;
|
||||||
|
BatteryValueColorSmooth = 0x2802;
|
||||||
CurrentThemeString = myLanguage[language][84];
|
CurrentThemeString = myLanguage[language][84];
|
||||||
break;
|
break;
|
||||||
case 7: // Whiteout theme
|
case 7: // Whiteout theme
|
||||||
PrimaryColor = TFT_BLACK;
|
PrimaryColor = TFT_BLACK;
|
||||||
PrimaryColorSmooth = 0xDFFC;
|
PrimaryColorSmooth = TFT_WHITE;
|
||||||
SecondaryColor = TFT_BLACK;
|
SecondaryColor = TFT_BLACK;
|
||||||
SecondaryColorSmooth = 0xDFFC;
|
SecondaryColorSmooth = TFT_WHITE;
|
||||||
FrequencyColor = 0x18C3;
|
FrequencyColor = 0x18C3;
|
||||||
FrameColor = 0x630C;
|
FrameColor = 0x630C;
|
||||||
GreyoutColor = 0x9492;
|
GreyoutColor = 0x9492;
|
||||||
@@ -4532,7 +4546,9 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarSignificantColor = TFT_BLACK;
|
BarSignificantColor = TFT_BLACK;
|
||||||
BarInsignificantColor = TFT_GREEN;
|
BarInsignificantColor = TFT_GREEN;
|
||||||
BWAutoColor = 0x7BCF;
|
BWAutoColor = 0x7BCF;
|
||||||
BWAutoColorSmooth = 0x1082;
|
BWAutoColorSmooth = TFT_WHITE;
|
||||||
|
BatteryValueColor = TFT_BLACK;
|
||||||
|
BatteryValueColorSmooth = TFT_WHITE;
|
||||||
CurrentThemeString = myLanguage[language][85];
|
CurrentThemeString = myLanguage[language][85];
|
||||||
break;
|
break;
|
||||||
case 8: // Tangerine theme
|
case 8: // Tangerine theme
|
||||||
@@ -4542,7 +4558,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
SecondaryColorSmooth = 0x10E4;
|
SecondaryColorSmooth = 0x10E4;
|
||||||
FrequencyColor = 0xF980;
|
FrequencyColor = 0xF980;
|
||||||
FrameColor = 0x38A1;
|
FrameColor = 0x38A1;
|
||||||
GreyoutColor = 0x4A69;
|
GreyoutColor = 0x6247;
|
||||||
BackgroundColor = TFT_BLACK;
|
BackgroundColor = TFT_BLACK;
|
||||||
ActiveColor = TFT_WHITE;
|
ActiveColor = TFT_WHITE;
|
||||||
ActiveColorSmooth = 0x18E3;
|
ActiveColorSmooth = 0x18E3;
|
||||||
@@ -4556,8 +4572,10 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
RDSColorSmooth = 0x3080;
|
RDSColorSmooth = 0x3080;
|
||||||
BarSignificantColor = TFT_RED;
|
BarSignificantColor = TFT_RED;
|
||||||
BarInsignificantColor = TFT_GREEN;
|
BarInsignificantColor = TFT_GREEN;
|
||||||
BWAutoColor = 0x07F7;
|
BWAutoColor = 0xED20;
|
||||||
BWAutoColorSmooth = 0x0144;
|
BWAutoColorSmooth = 0x3940;
|
||||||
|
BatteryValueColor = 0xED20;
|
||||||
|
BatteryValueColorSmooth = 0x3940;
|
||||||
CurrentThemeString = myLanguage[language][170];
|
CurrentThemeString = myLanguage[language][170];
|
||||||
break;
|
break;
|
||||||
case 9: // Ocean theme
|
case 9: // Ocean theme
|
||||||
@@ -4567,7 +4585,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
SecondaryColorSmooth = 0x10E4;
|
SecondaryColorSmooth = 0x10E4;
|
||||||
FrequencyColor = 0x01FF;
|
FrequencyColor = 0x01FF;
|
||||||
FrameColor = 0x0010;
|
FrameColor = 0x0010;
|
||||||
GreyoutColor = 0x08A8;
|
GreyoutColor = 0x420C;
|
||||||
BackgroundColor = TFT_BLACK;
|
BackgroundColor = TFT_BLACK;
|
||||||
ActiveColor = TFT_WHITE;
|
ActiveColor = TFT_WHITE;
|
||||||
ActiveColorSmooth = 0x18E3;
|
ActiveColorSmooth = 0x18E3;
|
||||||
@@ -4581,8 +4599,10 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
RDSColorSmooth = 0x0006;
|
RDSColorSmooth = 0x0006;
|
||||||
BarSignificantColor = TFT_RED;
|
BarSignificantColor = TFT_RED;
|
||||||
BarInsignificantColor = 0x01FF;
|
BarInsignificantColor = 0x01FF;
|
||||||
BWAutoColor = 0x07F7;
|
BWAutoColor = 0x051F;
|
||||||
BWAutoColorSmooth = 0x0144;
|
BWAutoColorSmooth = 0x0106;
|
||||||
|
BatteryValueColor = 0x051F;
|
||||||
|
BatteryValueColorSmooth = 0x0106;
|
||||||
CurrentThemeString = myLanguage[language][171];
|
CurrentThemeString = myLanguage[language][171];
|
||||||
break;
|
break;
|
||||||
case 10: // Indigo theme
|
case 10: // Indigo theme
|
||||||
@@ -4592,7 +4612,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
SecondaryColorSmooth = 0x41C8;
|
SecondaryColorSmooth = 0x41C8;
|
||||||
FrequencyColor = 0x881F;
|
FrequencyColor = 0x881F;
|
||||||
FrameColor = 0x6016;
|
FrameColor = 0x6016;
|
||||||
GreyoutColor = 0x300c;
|
GreyoutColor = 0x49AC;
|
||||||
BackgroundColor = TFT_BLACK;
|
BackgroundColor = TFT_BLACK;
|
||||||
ActiveColor = TFT_WHITE;
|
ActiveColor = TFT_WHITE;
|
||||||
ActiveColorSmooth = 0x18E3;
|
ActiveColorSmooth = 0x18E3;
|
||||||
@@ -4608,6 +4628,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
BarInsignificantColor = 0x881F;
|
BarInsignificantColor = 0x881F;
|
||||||
BWAutoColor = 0xD01F;
|
BWAutoColor = 0xD01F;
|
||||||
BWAutoColorSmooth = 0x400A;
|
BWAutoColorSmooth = 0x400A;
|
||||||
|
BatteryValueColor = 0xD01F;
|
||||||
|
BatteryValueColorSmooth = 0x400A;
|
||||||
CurrentThemeString = myLanguage[language][172];
|
CurrentThemeString = myLanguage[language][172];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user