You've already forked TEF6686_ESP32
Finished color mapping, add new theme
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
//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 */
|
||||
@@ -55,6 +55,10 @@ extern int InsignificantColor;
|
||||
extern int InsignificantColorSmooth;
|
||||
extern int PrimaryColor;
|
||||
extern int PrimaryColorSmooth;
|
||||
extern int RDSColor;
|
||||
extern int RDSColorSmooth;
|
||||
extern int RDSDropoutColor;
|
||||
extern int RDSDropoutColorSmooth;
|
||||
extern int scanner_filter;
|
||||
extern int SignificantColor;
|
||||
extern int SignificantColorSmooth;
|
||||
|
||||
@@ -105,6 +105,91 @@
|
||||
#define SW_MI_BAND_120M 120
|
||||
#define SW_MI_BAND_160M 160
|
||||
|
||||
//MAIN COLORS /* RGB 565 CODES */
|
||||
#define Black 0x0000 /* 0, 0, 0 */
|
||||
#define Blue 0x001F /* 0, 0, 31 */
|
||||
#define Cabbage 0x07F6 /* 0, 63, 22 */
|
||||
#define Coral 0xFBEF /* 31, 31, 15 */
|
||||
#define Crimson 0xF8C3 /* 31, 6, 3 */
|
||||
#define Cyan 0x0F3F /* 1, 57, 31 */
|
||||
#define Cherry 0xF00A /* 30, 0, 10 */
|
||||
#define Grey 0x7BEF /* 15, 31, 15 */
|
||||
#define Darkgrey 0x39A7 /* 7, 13, 7 */
|
||||
#define Deepsky 0x051F /* 0, 40, 31 */
|
||||
#define Green 0x07E0 /* 0, 63, 0 */
|
||||
#define Indigo 0x881F /* 17, 0, 31 */
|
||||
#define Maroon 0x5140 /* 10, 10, 0 */
|
||||
#define Ocean 0x01FF /* 0, 15, 31 */
|
||||
#define Orange 0xFC00 /* 31, 32, 0 */
|
||||
#define Purple 0xAA1C /* 21, 16, 28 */
|
||||
#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 Violet 0xD01F /* 26, 0, 31 */
|
||||
#define Watermelon 0xFA8D /* 21, 20, 13 */
|
||||
#define White 0xFFFF /* 31, 63, 31 */
|
||||
#define Yellow 0xFFE0 /* 31, 63, 0 */
|
||||
#define Yolk 0xED20 /* 29, 41, 0 */
|
||||
//SMOOTH COLORS
|
||||
#define CabbageSmooth 0x0184 /* 0, 12, 4 */
|
||||
#define CoralSmooth 0x4124 /* 8, 9, 4 */
|
||||
#define CrimsonSmooth 0x3800 /* 7, 0, 0 */
|
||||
#define CherrySmooth 0x3800 /* 5, 0, 2 */
|
||||
#define CyanSmooth 0x0105 /* 0, 8, 5 */
|
||||
#define DeepskySmooth 0x0106 /* 0, 8, 6 */
|
||||
#define GreenSmooth 0x00C0 /* 0, 6, 0 */
|
||||
#define IndigoSmooth 0x3080 /* 4, 0, 7 */
|
||||
#define OceanSmooth 0x0006 /* 0, 0, 6 */
|
||||
#define MaroonSmooth 0x3002 /* 6, 0, 2 */
|
||||
#define OrangeSmooth 0x3165 /* 6, 11, 5 */
|
||||
#define PurpleSmooth 0x2887 /* 5, 4, 7 */
|
||||
#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 VioletSmooth 0x400A /* 8, 0, 10 */
|
||||
#define WatermelonSmooth 0x3083 /* 6, 4, 3 */
|
||||
#define WhiteSmooth 0x18E3 /* 3, 7, 3 */
|
||||
#define YellowSmooth 0x2120 /* 4, 9, 0 */
|
||||
#define YolkSmooth 0x3940 /* 7, 10, 0 */
|
||||
//BACKGROUND/FRAME/GREY COLORS
|
||||
#define Blackberry 0x38C5 /* 7, 6, 5 */
|
||||
#define Chocolate 0x38A1 /* 27, 63, 28 */
|
||||
#define Copper 0x9B8D /* 19, 28, 13 */
|
||||
#define CopperSmooth 0x5207 /* 6, 13, 8 */
|
||||
#define Cornblue 0x420C /* 8, 16, 12 */
|
||||
#define Cove 0x73F4 /* 14, 31, 20 */
|
||||
#define CoveSmooth 0x31A8 /* 6, 13, 8 */
|
||||
#define CrimsonDark 0x6A08 /* 13, 16, 8 */
|
||||
#define CrimsonDarkSmooth 0x30E3 /* 6, 7, 3 */
|
||||
#define CyanDark 0x5BAF /* 11, 29, 15 */
|
||||
#define CyanDarkSmooth 0x29E8 /* 5, 15, 8 */
|
||||
#define CyanFrame 0x01E9 /* 0, 15, 9 */
|
||||
#define CyanGrey 0x2A08 /* 5, 16, 8 */
|
||||
#define Dallas 0x6A86 /* 13, 20, 6 */
|
||||
#define DallasSmooth 0x3123 /* 6, 9, 3 */
|
||||
#define Electric 0x6016 /* 12, 0, 22 */
|
||||
#define GreenDark 0x0200 /* 0, 16, 0 */
|
||||
#define GreenGrey 0x2965 /* 5, 11, 5 */
|
||||
#define Honeydew 0xDFFC /* 27, 63, 28 */
|
||||
#define Laurel 0x748E /* 14, 36, 14 */
|
||||
#define LaurelSmooth 0x3206 /* 6, 16, 6 */
|
||||
#define Logan 0x9C96 /* 19, 36, 22 */
|
||||
#define LoganSmooth 0x41C8 /* 8, 14, 8 */
|
||||
#define Meteorite 0x49AC /* 9, 13, 12 */
|
||||
#define Navy 0x0010 /* 0, 0, 16 */
|
||||
#define PaleGrey 0x4A69 /* 9, 19, 9 */
|
||||
#define Prussian 0x0806 /* 1, 0, 6 */
|
||||
#define PureGrey 0x7BCF /* 15, 30, 15 */
|
||||
#define SakuraGrey 0x9B90 /* 19, 28, 16 */
|
||||
#define SakuraGreySmooth 0x3946 /* 7, 10, 6 */
|
||||
#define Spice 0x6247 /* 12, 18, 7 */
|
||||
#define Tyrian 0x3845 /* 7, 2, 5 */
|
||||
|
||||
// EEPROM index defines
|
||||
#define EE_PRESETS_CNT 99
|
||||
#define EE_CHECKBYTE_VALUE 2 // 0 ~ 255,add new entry, change for new value
|
||||
@@ -199,7 +284,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 Theme[] = {"Essence", "Cyan", "Crimson", "Monochrome", "Volcano", "Dendro", "Sakura", "Whiteout", "Tangerine", "Ocean", "Indigo", "Maroon", "GoldBrite"};
|
||||
static const char* const Skin[] = {"Essential"};
|
||||
|
||||
// FM band: before BAND_GAP; AM band: after BAND_GAP
|
||||
|
||||
209
src/gui.cpp
209
src/gui.cpp
@@ -1,7 +1,6 @@
|
||||
#include "gui.h"
|
||||
#include "language.h"
|
||||
#include "constants.h"
|
||||
#include "ARS_Colors.h"
|
||||
#include <WiFi.h>
|
||||
#include <Wire.h>
|
||||
#include <EEPROM.h>
|
||||
@@ -64,8 +63,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
StereoColorSmooth = CyanSmooth;
|
||||
RDSColor = Cyan;
|
||||
RDSColorSmooth = CyanSmooth;
|
||||
RDSDropoutColor = Teal;
|
||||
RDSDropoutColorSmooth = TealSmooth;
|
||||
RDSDropoutColor = CyanDark;
|
||||
RDSDropoutColorSmooth = CyanDarkSmooth;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Cyan;
|
||||
ModBarSignificantColor = Red;
|
||||
@@ -78,8 +77,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
case 2: // Crimson theme
|
||||
PrimaryColor = Crimson;
|
||||
PrimaryColorSmooth = CrimsonSmooth;
|
||||
SecondaryColor = CrimsonDarkBW;
|
||||
SecondaryColorSmooth = 0x4124;
|
||||
SecondaryColor = Coral;
|
||||
SecondaryColorSmooth = CoralSmooth;
|
||||
FrameColor = CrimsonSmooth;
|
||||
GreyoutColor = PaleGrey;
|
||||
BackgroundColor = Black;
|
||||
@@ -95,23 +94,23 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
StereoColorSmooth = Black;
|
||||
RDSColor = Crimson;
|
||||
RDSColorSmooth = Black;
|
||||
RDSDropoutColor = CrimsonDarkBW;
|
||||
RDSDropoutColorSmooth = 0x4124;
|
||||
RDSDropoutColor = CrimsonDark;
|
||||
RDSDropoutColorSmooth = CrimsonDarkSmooth;
|
||||
BarSignificantColor = Yellow;
|
||||
BarInsignificantColor = Crimson;
|
||||
ModBarSignificantColor = Yellow;
|
||||
ModBarInsignificantColor = Crimson;
|
||||
BWAutoColor = CrimsonDarkBW;
|
||||
BWAutoColorSmooth = 0x4124;
|
||||
BatteryValueColor = 0xFA8D;
|
||||
BatteryValueColorSmooth = 0x3083;
|
||||
BWAutoColor = Coral;
|
||||
BWAutoColorSmooth = CoralSmooth;
|
||||
BatteryValueColor = Watermelon;
|
||||
BatteryValueColorSmooth = WatermelonSmooth;
|
||||
break;
|
||||
case 3: // Monochrome theme
|
||||
PrimaryColor = White;
|
||||
PrimaryColorSmooth = Black;
|
||||
SecondaryColor = PureGrey;
|
||||
SecondaryColorSmooth = 0x1082;
|
||||
FrameColor = 0x2965;
|
||||
SecondaryColorSmooth = Black;
|
||||
FrameColor = GreenGrey;
|
||||
GreyoutColor = PaleGrey;
|
||||
BackgroundColor = Black;
|
||||
FreqColor = White;
|
||||
@@ -127,26 +126,26 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
RDSColor = White;
|
||||
RDSColorSmooth = Black;
|
||||
RDSDropoutColor = PureGrey;
|
||||
RDSDropoutColorSmooth = 0x1082;
|
||||
RDSDropoutColorSmooth = Black;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Green;
|
||||
ModBarSignificantColor = Red;
|
||||
ModBarInsignificantColor = Green;
|
||||
BWAutoColor = PureGrey;
|
||||
BWAutoColorSmooth = 0x1082;
|
||||
BWAutoColorSmooth = Black;
|
||||
BatteryValueColor = White;
|
||||
BatteryValueColorSmooth = Black;
|
||||
break;
|
||||
case 4: // Volcano theme
|
||||
PrimaryColor = Orange;
|
||||
PrimaryColorSmooth = 0x2965;
|
||||
PrimaryColorSmooth = GreenGrey;
|
||||
SecondaryColor = Tangerine;
|
||||
SecondaryColorSmooth = TangerineSmooth;
|
||||
FrameColor = 0x2965;
|
||||
GreyoutColor = 0x5140;
|
||||
BackgroundColor = 0x0806;
|
||||
FrameColor = GreenGrey;
|
||||
GreyoutColor = Maroon;
|
||||
BackgroundColor = Prussian;
|
||||
FreqColor = Orange;
|
||||
FreqColorSmooth = 0x2965;
|
||||
FreqColorSmooth = GreenGrey;
|
||||
ActiveColor = White;
|
||||
ActiveColorSmooth = WhiteSmooth;
|
||||
SignificantColor = Red;
|
||||
@@ -157,8 +156,8 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
StereoColorSmooth = CyanSmooth;
|
||||
RDSColor = Orange;
|
||||
RDSColorSmooth = White;
|
||||
RDSDropoutColor = Tangerine;
|
||||
RDSDropoutColorSmooth = TangerineSmooth;
|
||||
RDSDropoutColor = Dallas;
|
||||
RDSDropoutColorSmooth = DallasSmooth;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Orange;
|
||||
ModBarSignificantColor = Red;
|
||||
@@ -170,42 +169,42 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
break;
|
||||
case 5: // Dendro theme
|
||||
PrimaryColor = Green;
|
||||
PrimaryColorSmooth = 0x0200;
|
||||
SecondaryColor = 0x07F6;
|
||||
SecondaryColorSmooth = 0x0184;
|
||||
FrameColor = 0x0200;
|
||||
PrimaryColorSmooth = GreenDark;
|
||||
SecondaryColor = Cabbage;
|
||||
SecondaryColorSmooth = CabbageSmooth;
|
||||
FrameColor = GreenDark;
|
||||
GreyoutColor = PaleGrey;
|
||||
BackgroundColor = Black;
|
||||
FreqColor = Green;
|
||||
FreqColorSmooth = 0x0200;
|
||||
FreqColorSmooth = GreenDark;
|
||||
ActiveColor = White;
|
||||
ActiveColorSmooth = WhiteSmooth;
|
||||
SignificantColor = Red;
|
||||
SignificantColorSmooth = RedSmooth;
|
||||
InsignificantColor = 0xAA1C;
|
||||
InsignificantColor = Green;
|
||||
InsignificantColorSmooth = GreenSmooth;
|
||||
StereoColor = Green;
|
||||
StereoColorSmooth = 0x0200;
|
||||
StereoColorSmooth = GreenDark;
|
||||
RDSColor = Green;
|
||||
RDSColorSmooth = 0x0200;
|
||||
RDSDropoutColor = 0x07F6;
|
||||
RDSDropoutColorSmooth = 0x0184;
|
||||
RDSColorSmooth = GreenDark;
|
||||
RDSDropoutColor = Laurel;
|
||||
RDSDropoutColorSmooth = LaurelSmooth;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Green;
|
||||
ModBarSignificantColor = Red;
|
||||
ModBarInsignificantColor = Green;
|
||||
BWAutoColor = 0x07F6;
|
||||
BWAutoColorSmooth = 0x0184;
|
||||
BatteryValueColor = 0x07F6;
|
||||
BatteryValueColorSmooth = 0x0184;
|
||||
BWAutoColor = Cabbage;
|
||||
BWAutoColorSmooth = CabbageSmooth;
|
||||
BatteryValueColor = Cabbage;
|
||||
BatteryValueColorSmooth = CabbageSmooth;
|
||||
break;
|
||||
case 6: // Sakura theme
|
||||
PrimaryColor = Sakura;
|
||||
PrimaryColorSmooth = SakuraSmooth;
|
||||
SecondaryColor = 0xF00A;
|
||||
SecondaryColorSmooth = 0x2802;
|
||||
FrameColor = 0x3845;
|
||||
GreyoutColor = 0x38C5;
|
||||
SecondaryColor = Cherry;
|
||||
SecondaryColorSmooth = CherrySmooth;
|
||||
FrameColor = Tyrian;
|
||||
GreyoutColor = Blackberry;
|
||||
BackgroundColor = Black;
|
||||
FreqColor = Sakura;
|
||||
FreqColorSmooth = SakuraSmooth;
|
||||
@@ -219,38 +218,38 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
StereoColorSmooth = SakuraSmooth;
|
||||
RDSColor = Sakura;
|
||||
RDSColorSmooth = SakuraSmooth;
|
||||
RDSDropoutColor = 0xF00A;
|
||||
RDSDropoutColorSmooth = 0x2802;
|
||||
RDSDropoutColor = SakuraGrey;
|
||||
RDSDropoutColorSmooth = SakuraGreySmooth;
|
||||
BarSignificantColor = Black;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Sakura;
|
||||
ModBarSignificantColor = Red;
|
||||
ModBarInsignificantColor = Sakura;
|
||||
BWAutoColor = 0xF00A;
|
||||
BWAutoColorSmooth = 0x2802;
|
||||
BatteryValueColor = 0xF00A;
|
||||
BatteryValueColorSmooth = 0x2802;
|
||||
BWAutoColor = Cherry;
|
||||
BWAutoColorSmooth = CherrySmooth;
|
||||
BatteryValueColor = Cherry;
|
||||
BatteryValueColorSmooth = CherrySmooth;
|
||||
break;
|
||||
case 7: // Whiteout theme
|
||||
PrimaryColor = Black;
|
||||
PrimaryColorSmooth = White;
|
||||
SecondaryColor = 0x9492;
|
||||
SecondaryColor = Grey;
|
||||
SecondaryColorSmooth = White;
|
||||
FrameColor = 0x630C;
|
||||
GreyoutColor = 0x9492;
|
||||
BackgroundColor = 0xDFFC;
|
||||
FrameColor = Darkgrey;
|
||||
GreyoutColor = PureGrey;
|
||||
BackgroundColor = Honeydew;
|
||||
FreqColor = Black;
|
||||
FreqColorSmooth = White;
|
||||
ActiveColor = Black;
|
||||
ActiveColorSmooth = 0xDFFC;
|
||||
ActiveColorSmooth = Honeydew;
|
||||
SignificantColor = Red;
|
||||
SignificantColorSmooth = 0xDFFC;
|
||||
SignificantColorSmooth = Honeydew;
|
||||
InsignificantColor = Green;
|
||||
InsignificantColorSmooth = 0x0140;
|
||||
InsignificantColorSmooth = GreenSmooth;
|
||||
StereoColor = Black;
|
||||
StereoColorSmooth = 0xDFFC;
|
||||
StereoColorSmooth = Honeydew;
|
||||
RDSColor = Black;
|
||||
RDSColorSmooth = 0xDFFC;
|
||||
RDSColorSmooth = Honeydew;
|
||||
RDSDropoutColor = PureGrey;
|
||||
RDSDropoutColorSmooth = White;
|
||||
BarSignificantColor = Black;
|
||||
@@ -265,10 +264,10 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
case 8: // Tangerine theme
|
||||
PrimaryColor = Tangerine;
|
||||
PrimaryColorSmooth = TangerineSmooth;
|
||||
SecondaryColor = 0xED20;
|
||||
SecondaryColorSmooth = 0x3940;
|
||||
FrameColor = 0x38A1;
|
||||
GreyoutColor = 0x6247;
|
||||
SecondaryColor = Yolk;
|
||||
SecondaryColorSmooth = YolkSmooth;
|
||||
FrameColor = Chocolate;
|
||||
GreyoutColor = Spice;
|
||||
BackgroundColor = Black;
|
||||
FreqColor = Tangerine;
|
||||
FreqColorSmooth = IndigoSmooth;
|
||||
@@ -282,24 +281,24 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
StereoColorSmooth = IndigoSmooth;
|
||||
RDSColor = Tangerine;
|
||||
RDSColorSmooth = IndigoSmooth;
|
||||
RDSDropoutColor = 0xED20;
|
||||
RDSDropoutColorSmooth = 0x3940;
|
||||
RDSDropoutColor = Copper;
|
||||
RDSDropoutColorSmooth = CopperSmooth;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Green;
|
||||
ModBarSignificantColor = Red;
|
||||
ModBarInsignificantColor = Green;
|
||||
BWAutoColor = 0xED20;
|
||||
BWAutoColorSmooth = 0x3940;
|
||||
BatteryValueColor = 0xED20;
|
||||
BatteryValueColorSmooth = 0x3940;
|
||||
BWAutoColor = Yolk;
|
||||
BWAutoColorSmooth = YolkSmooth;
|
||||
BatteryValueColor = Yolk;
|
||||
BatteryValueColorSmooth = YolkSmooth;
|
||||
break;
|
||||
case 9: // Ocean theme
|
||||
PrimaryColor = Ocean;
|
||||
PrimaryColorSmooth = OceanSmooth;
|
||||
SecondaryColor = 0x051F;
|
||||
SecondaryColorSmooth = 0x0106;
|
||||
FrameColor = 0x0010;
|
||||
GreyoutColor = 0x420C;
|
||||
SecondaryColor = Deepsky;
|
||||
SecondaryColorSmooth = DeepskySmooth;
|
||||
FrameColor = Navy;
|
||||
GreyoutColor = Cornblue;
|
||||
BackgroundColor = Black;
|
||||
FreqColor = Ocean;
|
||||
FreqColorSmooth = OceanSmooth;
|
||||
@@ -313,27 +312,27 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
StereoColorSmooth = OceanSmooth;
|
||||
RDSColor = Ocean;
|
||||
RDSColorSmooth = OceanSmooth;
|
||||
RDSDropoutColor = 0x051F;
|
||||
RDSDropoutColorSmooth = 0x0106;
|
||||
RDSDropoutColor = Cove;
|
||||
RDSDropoutColorSmooth = CoveSmooth;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Ocean;
|
||||
ModBarSignificantColor = Red;
|
||||
ModBarInsignificantColor = Ocean;
|
||||
BWAutoColor = 0x051F;
|
||||
BWAutoColorSmooth = 0x0106;
|
||||
BatteryValueColor = 0x051F;
|
||||
BatteryValueColorSmooth = 0x0106;
|
||||
BWAutoColor = Deepsky;
|
||||
BWAutoColorSmooth = DeepskySmooth;
|
||||
BatteryValueColor = Deepsky;
|
||||
BatteryValueColorSmooth = DeepskySmooth;
|
||||
break;
|
||||
case 10: // Indigo theme
|
||||
PrimaryColor = Indigo;
|
||||
PrimaryColorSmooth = IndigoSmooth;
|
||||
SecondaryColor = 0xD01F;
|
||||
SecondaryColorSmooth = 0x400A;
|
||||
FrameColor = 0x6016;
|
||||
GreyoutColor = 0x49AC;
|
||||
SecondaryColor = Violet;
|
||||
SecondaryColorSmooth = VioletSmooth;
|
||||
FrameColor = Electric;
|
||||
GreyoutColor = Meteorite;
|
||||
BackgroundColor = Black;
|
||||
FreqColor = Indigo;
|
||||
FreqColorSmooth = 0x2007;
|
||||
FreqColorSmooth = IndigoSmooth;
|
||||
ActiveColor = White;
|
||||
ActiveColorSmooth = WhiteSmooth;
|
||||
SignificantColor = Red;
|
||||
@@ -341,22 +340,54 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
||||
InsignificantColor = Green;
|
||||
InsignificantColorSmooth = GreenSmooth;
|
||||
StereoColor = Indigo;
|
||||
StereoColorSmooth = 0x2007;
|
||||
StereoColorSmooth = IndigoSmooth;
|
||||
RDSColor = Indigo;
|
||||
RDSColorSmooth = 0x2007;
|
||||
RDSDropoutColor = 0x9C96;
|
||||
RDSDropoutColorSmooth = 0x41C8;
|
||||
RDSColorSmooth = IndigoSmooth;
|
||||
RDSDropoutColor = Logan;
|
||||
RDSDropoutColorSmooth = LoganSmooth;
|
||||
BarSignificantColor = Red;
|
||||
BarInsignificantColor = Indigo;
|
||||
ModBarSignificantColor = Red;
|
||||
ModBarInsignificantColor = Indigo;
|
||||
BWAutoColor = 0xD01F;
|
||||
BWAutoColorSmooth = 0x400A;
|
||||
BatteryValueColor = 0xD01F;
|
||||
BatteryValueColorSmooth = 0x400A;
|
||||
BWAutoColor = Violet;
|
||||
BWAutoColorSmooth = VioletSmooth;
|
||||
BatteryValueColor = Violet;
|
||||
BatteryValueColorSmooth = VioletSmooth;
|
||||
break;
|
||||
|
||||
case 11: // GoldBrite
|
||||
case 11: // Maroon
|
||||
PrimaryColor = Cherry;
|
||||
PrimaryColorSmooth = CherrySmooth;
|
||||
SecondaryColor = Crimson;
|
||||
SecondaryColorSmooth = CrimsonSmooth;
|
||||
FrameColor = Electric;
|
||||
GreyoutColor = CoralSmooth;
|
||||
BackgroundColor = MaroonSmooth;
|
||||
ActiveColor = White;
|
||||
ActiveColorSmooth = WhiteSmooth;
|
||||
FreqColor = Cherry;
|
||||
FreqColorSmooth = CherrySmooth;
|
||||
SignificantColor = Red;
|
||||
SignificantColorSmooth = RedSmooth;
|
||||
InsignificantColor = Violet;
|
||||
InsignificantColorSmooth = VioletSmooth;
|
||||
StereoColor = Cherry;
|
||||
StereoColorSmooth = CherrySmooth;
|
||||
RDSColor = Coral;
|
||||
RDSColorSmooth = CoralSmooth;
|
||||
RDSDropoutColor = Logan;
|
||||
RDSDropoutColorSmooth = LoganSmooth;
|
||||
BarSignificantColor = Yolk;
|
||||
BarInsignificantColor = Cherry;
|
||||
ModBarSignificantColor = Yolk;
|
||||
ModBarInsignificantColor = Cherry;
|
||||
BWAutoColor = Violet;
|
||||
BWAutoColorSmooth = VioletSmooth;
|
||||
BatteryValueColor = Purple;
|
||||
BatteryValueColorSmooth = PurpleSmooth;
|
||||
break;
|
||||
|
||||
case 12: // GoldBrite
|
||||
PrimaryColor = Yellow;
|
||||
PrimaryColorSmooth = YellowSmooth;
|
||||
SecondaryColor = Skyblue;
|
||||
|
||||
@@ -912,14 +912,14 @@ static const char* const myLanguage[18][205] = {
|
||||
"Χρονοδιακόπτης λήξης", // 75
|
||||
"Οθόνη σβηστή", // 76
|
||||
"Θέμα", // 77
|
||||
"Skin", // 78 ***
|
||||
"Γραφικό\nπεριβάλλον", // 78 ***
|
||||
"Εντοπισμένες εφαρμογές", // 79
|
||||
"Λεπτά", // 80
|
||||
"Δυναμική ταχύτητα\nSPI", // 81
|
||||
"Ευαισθησία\nανίχνευσης", // 82
|
||||
"KAMIA", // 83
|
||||
"Έκδοση λογισμικού", // 84
|
||||
"Γραμματοσειρά\nσυχνότητας", // 85 ***
|
||||
"Γραμματοσειρά\nσυχνότητας", // 85
|
||||
"ΜΗ ΔΥΝΑΤΟ", // 86
|
||||
"Μη διαθέσιμο AF", // 87
|
||||
"Μη διαθέσιμο EON", // 88
|
||||
|
||||
92
src/rds.cpp
92
src/rds.cpp
@@ -37,7 +37,7 @@ void ShowAdvancedRDS() {
|
||||
if (!screenmute) tftPrint(-1, "PTYN N/A", 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||
if (!screenmute) tftPrint(-1, ptynold, 216, 109, BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.rds.PTYN.length() == 0) radio.rds.PTYN = "PTYN N/A";
|
||||
if (!screenmute) tftPrint(-1, String(radio.rds.PTYN), 216, 109, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (!screenmute) tftPrint(-1, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth, 16);
|
||||
ptynold = radio.rds.PTYN;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void ShowAdvancedRDS() {
|
||||
if (!screenmute) {
|
||||
tftPrint(-1, "N/A", 242, 208, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, LIColdString, 242, 208, BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasLIC) tftPrint(-1, (radio.rds.LICtext.length() == 0 ? myLanguage[language][73] : radio.rds.LICtext), 242, 208, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "N/A", 242, 208, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (radio.rds.hasLIC) tftPrint(-1, (radio.rds.LICtext.length() == 0 ? myLanguage[language][73] : radio.rds.LICtext), 242, 208, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "N/A", 242, 208, RDSColor, RDSColorSmooth, 16);
|
||||
if (radio.rds.LICtext.length() == 0) LIColdString = myLanguage[language][73]; else LIColdString = radio.rds.LICtext;
|
||||
}
|
||||
licold = radio.rds.LIC;
|
||||
@@ -57,7 +57,7 @@ void ShowAdvancedRDS() {
|
||||
tftPrint(-1, "N/A", 242, 223, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, pinstringold, 242, 223, BackgroundColor, BackgroundColor, 16);
|
||||
|
||||
if (radio.rds.hasPIN) tftPrint(-1, pinstring, 242, 223, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "N/A", 242, 223, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (radio.rds.hasPIN) tftPrint(-1, pinstring, 242, 223, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "N/A", 242, 223, RDSColor, RDSColorSmooth, 16);
|
||||
pinstringold = pinstring;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ void ShowAdvancedRDS() {
|
||||
if (radio.rds.hasAF) for (byte i = 0; i < radio.af_counter; i++) afstring += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (i == radio.af_counter - 1 ? " " : " | "); else afstring = myLanguage[language][87];
|
||||
if (hasafold != radio.rds.hasAF) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
hasafold = radio.rds.hasAF;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ void ShowAdvancedRDS() {
|
||||
}
|
||||
if (xPos2 < -tft.textWidth(afstring) + (charWidth * 14)) xPos2 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) RDSSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RDSSprite.drawString(afstring, xPos2, 2);
|
||||
RDSSprite.pushSprite(35, 197);
|
||||
afticker = millis();
|
||||
@@ -93,7 +93,7 @@ void ShowAdvancedRDS() {
|
||||
if (radio.eon_counter > 0) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? " " : " | "); else eonstring = myLanguage[language][88];
|
||||
if (haseonold != radio.rds.hasEON) {
|
||||
if (!screenmute) {
|
||||
if (radio.eon_counter > 0) tftPrint(-1, "EON", 153, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.eon_counter > 0) tftPrint(-1, "EON", 153, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
haseonold = radio.rds.hasEON;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ void ShowAdvancedRDS() {
|
||||
}
|
||||
if (xPos3 < -tft.textWidth(eonstring) + (charWidth * 14)) xPos3 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) RDSSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RDSSprite.drawString(eonstring, xPos3, 2);
|
||||
RDSSprite.pushSprite(35, 172);
|
||||
eonticker = millis();
|
||||
@@ -121,7 +121,7 @@ void ShowAdvancedRDS() {
|
||||
if (radio.rds.hasRDSplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(myLanguage[language][radio.rds.rdsplusTag1]) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(myLanguage[language][radio.rds.rdsplusTag2]) + ": " + String(radio.rds.RTContent2) : "") + " "; else rtplusstring = myLanguage[language][89];
|
||||
if (hasrtplusold != radio.rds.hasRDSplus) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 123, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 123, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
hasrtplusold = radio.rds.hasRDSplus;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ void ShowAdvancedRDS() {
|
||||
}
|
||||
if (xPos4 < -tft.textWidth(rtplusstring) + (charWidth * 14)) xPos4 = 0;
|
||||
RDSSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RDSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) RDSSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RDSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RDSSprite.drawString(rtplusstring, xPos4, 2);
|
||||
RDSSprite.pushSprite(35, 146);
|
||||
rtplusticker = millis();
|
||||
@@ -146,21 +146,21 @@ void ShowAdvancedRDS() {
|
||||
|
||||
if (TPold != radio.rds.hasTP) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasTP) tftPrint(-1, "TP", 2, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasTP) tftPrint(-1, "TP", 2, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
TPold = radio.rds.hasTP;
|
||||
}
|
||||
|
||||
if (TAold != radio.rds.hasTA) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasTA) tftPrint(-1, "TA", 24, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasTA) tftPrint(-1, "TA", 24, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "TA", 24, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
TAold = radio.rds.hasTA;
|
||||
}
|
||||
|
||||
if (afmethodBold != radio.afmethodB || rdsreset) {
|
||||
if (!screenmute) {
|
||||
if (radio.afmethodB) tftPrint(-1, "-B", 68, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.afmethodB) tftPrint(-1, "-B", 68, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "-B", 68, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
afmethodBold = radio.afmethodB;
|
||||
}
|
||||
@@ -174,13 +174,13 @@ void ShowAdvancedRDS() {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
tftPrint(-1, "M", 196, 51, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "M", 196, 51, RDSColor, RDSColorSmooth, 16);
|
||||
tftPrint(-1, "S", 185, 51, GreyoutColor, BackgroundColor, 16);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
tftPrint(-1, "M", 196, 51, GreyoutColor, BackgroundColor, 16);
|
||||
tftPrint(-1, "S", 185, 51, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, "S", 185, 51, RDSColor, RDSColorSmooth, 16);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -195,7 +195,7 @@ void ShowAdvancedRDS() {
|
||||
|
||||
if (hastmcold != radio.rds.hasTMC) {
|
||||
if (!screenmute) {
|
||||
if (radio.rds.hasTMC) tftPrint(-1, "TMC", 88, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasTMC) tftPrint(-1, "TMC", 88, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "TMC", 88, 51, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
hastmcold = radio.rds.hasTMC;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ void showECC() {
|
||||
if (!screenmute) {
|
||||
tftPrint(-1, "N/A", 242, 193, BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, ECColdtxt, 242, 193, BackgroundColor, BackgroundColor, 16);
|
||||
if (radio.rds.hasECC) tftPrint(-1, (radio.rds.ECCtext.length() == 0 ? myLanguage[language][73] : radio.rds.ECCtext), 242, 193, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "N/A", 242, 193, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (radio.rds.hasECC) tftPrint(-1, (radio.rds.ECCtext.length() == 0 ? myLanguage[language][73] : radio.rds.ECCtext), 242, 193, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, "N/A", 242, 193, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
if (radio.rds.ECCtext.length() == 0) ECColdtxt = myLanguage[language][73]; else ECColdtxt = radio.rds.ECCtext;
|
||||
}
|
||||
@@ -300,16 +300,16 @@ void readRds() {
|
||||
} else {
|
||||
if (dropout) {
|
||||
if (region == REGION_EU) {
|
||||
if (advancedRDS) tftPrint(0, PIold, 275, 75, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, PIold, 275, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(0, PIold, 275, 75, RDSColor, RDSColorSmooth, 28); else tftPrint(0, PIold, 275, 187, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
|
||||
if (region == REGION_US) {
|
||||
if (advancedRDS) tftPrint(-1, PIold, 240, 72, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, PIold, 240, 184, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(-1, stationIDold, 240, 89, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, stationIDold, 240, 201, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(-1, PIold, 240, 72, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, PIold, 240, 184, RDSColor, RDSColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(-1, stationIDold, 240, 89, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, stationIDold, 240, 201, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
|
||||
if (advancedRDS) tftPrint(-1, PSold, 38, 75, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(-1, PSold, 38, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, PTYold, 38, 163, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (advancedRDS) tftPrint(-1, PSold, 38, 75, RDSColor, RDSColorSmooth, 28); else tftPrint(-1, PSold, 38, 187, RDSColor, RDSColorSmooth, 28);
|
||||
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, RDSColor, RDSColorSmooth, 16); else tftPrint(-1, PTYold, 38, 163, RDSColor, RDSColorSmooth, 16);
|
||||
if (!advancedRDS) {
|
||||
tft.fillCircle(314, 223, 2, GreyoutColor);
|
||||
tft.fillCircle(314, 234, 2, GreyoutColor);
|
||||
@@ -321,22 +321,22 @@ void readRds() {
|
||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||
xPos = 0;
|
||||
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
||||
AdvRadiotextSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
AdvRadiotextSprite.pushSprite(35, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
xPos = 0;
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
RadiotextSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.pushSprite(38, 220);
|
||||
}
|
||||
|
||||
if (radio.rds.hasCT) {
|
||||
if (advancedRDS) {
|
||||
tftPrint(1, rds_clock, 205, 109, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, rds_clock, 205, 109, RDSColor, RDSColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(1, rds_clock, 205, 163, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, rds_clock, 205, 163, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
dropout = false;
|
||||
@@ -414,7 +414,7 @@ void showPI() {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 75, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 75, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 75, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
if (region == REGION_US) {
|
||||
@@ -422,8 +422,8 @@ void showPI() {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 72, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 72, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 89, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 72, RDSColor, RDSColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 89, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
tftReplace(1, stationStateold, radio.rds.stationState, 318, 89, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
@@ -434,7 +434,7 @@ void showPI() {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
tftReplace(0, PIold, radio.rds.picode, 275, 187, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
if (region == REGION_US) {
|
||||
@@ -442,8 +442,8 @@ void showPI() {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 184, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 201, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (String(radio.rds.picode) != PIold) tftReplace(-1, PIold, radio.rds.picode, 240, 184, RDSColor, RDSColorSmooth, 16);
|
||||
tftReplace(-1, stationIDold, radio.rds.stationID, 240, 201, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
tftReplace(1, stationStateold, radio.rds.stationState, 318, 201, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
}
|
||||
@@ -467,13 +467,13 @@ void showPTY() {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 38, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 38, 109, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 38, 109, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
} else {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 38, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
} else {
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 38, 163, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(-1, PTYold, radio.rds.stationType, 38, 163, RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,7 +495,7 @@ void showPS() {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 38, 75, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 38, 75, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 38, 75, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
} else if (afscreen) {
|
||||
tftReplace(0, PSold, radio.rds.stationName, 160, 201, BWAutoColor, BWAutoColorSmooth, 16);
|
||||
@@ -503,7 +503,7 @@ void showPS() {
|
||||
if (!RDSstatus) {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 38, 187, RDSDropoutColor, RDSDropoutColorSmooth, 28);
|
||||
} else {
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 38, 187, PrimaryColor, PrimaryColorSmooth, 28);
|
||||
tftReplace(-1, PSold, radio.rds.stationName, 38, 187, RDSColor, RDSColorSmooth, 28);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -539,7 +539,7 @@ void showCT() {
|
||||
if (radio.rds.hasCT && RDSstatus) {
|
||||
rtcset = true;
|
||||
rtc.setTime(0, radio.rds.minute, radio.rds.hour, radio.rds.day, radio.rds.month, radio.rds.year);
|
||||
if (advancedRDS) tftReplace(1, rds_clockold, rds_clock, 205, 109, PrimaryColor, PrimaryColorSmooth, 16); else tftReplace(1, rds_clockold, rds_clock, 205, 163, PrimaryColor, PrimaryColorSmooth, 16);
|
||||
if (advancedRDS) tftReplace(1, rds_clockold, rds_clock, 205, 109, RDSColor, RDSColorSmooth, 16); else tftReplace(1, rds_clockold, rds_clock, 205, 163, RDSColor, RDSColorSmooth, 16);
|
||||
} else {
|
||||
if (rtcset) {
|
||||
if (advancedRDS) tftReplace(1, rds_clockold, rds_clock, 205, 109, RDSDropoutColor, RDSDropoutColorSmooth, 16); else tftReplace(1, rds_clockold, rds_clock, 205, 163, RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||
@@ -564,13 +564,13 @@ void showRadioText() {
|
||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||
xPos = 0;
|
||||
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) AdvRadiotextSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
AdvRadiotextSprite.pushSprite(35, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
xPos = 0;
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.pushSprite(38, 220);
|
||||
} else {
|
||||
@@ -587,13 +587,13 @@ void showRadioText() {
|
||||
if (advancedRDS) {
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 10)) xPos = 0;
|
||||
AdvRadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) AdvRadiotextSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) AdvRadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else AdvRadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
AdvRadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
AdvRadiotextSprite.pushSprite(35, 220);
|
||||
} else {
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 20)) xPos = 0;
|
||||
RadiotextSprite.fillSprite(BackgroundColor);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
if (RDSstatus) RadiotextSprite.setTextColor(RDSColor, RDSColorSmooth, false); else RadiotextSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||
RadiotextSprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
RadiotextSprite.pushSprite(38, 220);
|
||||
}
|
||||
@@ -667,7 +667,7 @@ void ShowAFEON() {
|
||||
} else if (!radio.af[i].afvalid) {
|
||||
tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), SignificantColor, SignificantColorSmooth, 16);
|
||||
} else {
|
||||
tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 55 + (i > 9 ? 54 : 0) + (i > 19 ? 54 : 0) + (i > 29 ? 54 : 0) + (i > 39 ? 54 : 0), 48 + (15 * i) - (i > 9 ? 150 : 0) - (i > 19 ? 150 : 0) - (i > 29 ? 150 : 0) - (i > 39 ? 150 : 0), RDSColor, RDSColorSmooth, 16);
|
||||
}
|
||||
}
|
||||
if (radio.af_counter > 10) tft.drawLine(59, 54, 59, 191, SecondaryColor);
|
||||
@@ -694,7 +694,7 @@ void ShowAFEON() {
|
||||
if (afpagenr == 3) y = 10;
|
||||
for (byte i = 0; i < radio.eon_counter; i++) {
|
||||
if (strcmp(eonpicodeold[i + y], radio.eon[i + y].picode) != 0) tftPrint(-1, String(eonpicodeold[i + y]), 4, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(-1, String(radio.eon[i + y].picode), 4, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(-1, String(radio.eon[i + y].picode), 4, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
strcpy(eonpicodeold[i + y], radio.eon[i + y].picode);
|
||||
|
||||
if (radio.eon[i + y].ps.length() > 0) {
|
||||
@@ -711,7 +711,7 @@ void ShowAFEON() {
|
||||
tftPrint(1, "FREQ", 156, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
if (radio.eon[i + y].mappedfreq != mappedfreqold[i + y]) tftPrint(1, String(mappedfreqold[i + y] / 100) + "." + String((mappedfreqold[i + y] % 100) / 10), 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(1, String(radio.eon[i + y].mappedfreq / 100) + "." + String((radio.eon[i + y].mappedfreq % 100) / 10), 156, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, String(radio.eon[i + y].mappedfreq / 100) + "." + String((radio.eon[i + y].mappedfreq % 100) / 10), 156, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
mappedfreqold[i + y] = radio.eon[i + y].mappedfreq;
|
||||
} else {
|
||||
tftPrint(1, String(mappedfreqold[i + y] / 100) + "." + String((mappedfreqold[i + y] % 100) / 10), 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
@@ -719,7 +719,7 @@ void ShowAFEON() {
|
||||
|
||||
if (radio.eon[i + y].mappedfreq2 > 0) {
|
||||
if (radio.eon[i + y].mappedfreq2 != mappedfreqold2[i + y]) tftPrint(1, String(mappedfreqold2[i + y] / 100) + "." + String((mappedfreqold2[i + y] % 100) / 10), 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(1, String(radio.eon[i + y].mappedfreq2 / 100) + "." + String((radio.eon[i + y].mappedfreq2 % 100) / 10), 196, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, String(radio.eon[i + y].mappedfreq2 / 100) + "." + String((radio.eon[i + y].mappedfreq2 % 100) / 10), 196, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
mappedfreqold2[i + y] = radio.eon[i + y].mappedfreq2;
|
||||
} else {
|
||||
tftPrint(1, String(mappedfreqold2[i + y] / 100) + "." + String((mappedfreqold2[i + y] % 100) / 10), 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
@@ -728,7 +728,7 @@ void ShowAFEON() {
|
||||
|
||||
if (radio.eon[i + y].mappedfreq3 > 0) {
|
||||
if (radio.eon[i + y].mappedfreq3 != mappedfreqold3[i + y]) tftPrint(1, String(mappedfreqold3[i + y] / 100) + "." + String((mappedfreqold3[i + y] % 100) / 10), 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
tftPrint(1, String(radio.eon[i + y].mappedfreq3 / 100) + "." + String((radio.eon[i + y].mappedfreq3 % 100) / 10), 236, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftPrint(1, String(radio.eon[i + y].mappedfreq3 / 100) + "." + String((radio.eon[i + y].mappedfreq3 % 100) / 10), 236, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
mappedfreqold3[i + y] = radio.eon[i + y].mappedfreq3;
|
||||
} else {
|
||||
tftPrint(1, String(mappedfreqold3[i + y] / 100) + "." + String((mappedfreqold3[i + y] % 100) / 10), 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||
@@ -748,7 +748,7 @@ void ShowAFEON() {
|
||||
if (radio.eon[i + y].tp) tft.fillCircle(276, 54 + (15 * i), 4, InsignificantColor); else tft.fillCircle(276, 54 + (15 * i), 4, BackgroundColor);
|
||||
|
||||
if (radio.eon[i + y].pty != eonptyold[i + y]) {
|
||||
tftReplace(0, String(eonptyold[i + y]), (radio.eon[i + y].pty < 32 ? String(radio.eon[i + y].pty) : " "), 304, 48 + (15 * i), PrimaryColor, PrimaryColorSmooth, 16);
|
||||
tftReplace(0, String(eonptyold[i + y]), (radio.eon[i + y].pty < 32 ? String(radio.eon[i + y].pty) : " "), 304, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||
eonptyold[i + y] = radio.eon[i + y].pty;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ extern int InsignificantColor;
|
||||
extern int InsignificantColorSmooth;
|
||||
extern int PrimaryColor;
|
||||
extern int PrimaryColorSmooth;
|
||||
extern int RDSColor;
|
||||
extern int RDSColorSmooth;
|
||||
extern int RDSDropoutColor;
|
||||
extern int RDSDropoutColorSmooth;
|
||||
extern int SecondaryColor;
|
||||
|
||||
Reference in New Issue
Block a user