Merge branch 'main' into New_Model_DP_666

# Conflicts:
#	src/gui.cpp
This commit is contained in:
Leon
2024-09-17 17:02:51 +08:00
14 changed files with 416 additions and 197 deletions

View File

@@ -24,6 +24,7 @@ void Communication() {
if ((stlfreq.toInt()) / 10000 > (TEF == 205 ? 6400 : 6500) && (stlfreq.toInt()) / 10000 < 10800) {
unsigned int tempfreq = (stlfreq.toInt()) / 10000;
if (scandxmode) cancelDXScan();
if (tempfreq >= FREQ_FM_OIRT_START && tempfreq <= FREQ_FM_OIRT_END) {
if (band != BAND_OIRT) {
band = BAND_OIRT;
@@ -47,6 +48,7 @@ void Communication() {
}
if ((stlfreq.toInt()) / 1000 > 144 && (stlfreq.toInt()) / 1000 < 27000) {
if (scandxmode) cancelDXScan();
if (afscreen || advancedRDS) {
BuildDisplay();
SelectBand();
@@ -139,6 +141,7 @@ void Communication() {
String freq = data_str.substring(0, symPos);
freq = freq.substring(0, freq.length() - 1);
frequency = freq.toInt();
if (scandxmode) cancelDXScan();
radio.SetFreq(frequency);
radio.clearRDS(fullsearchrds);
if (band != BAND_FM) {
@@ -314,6 +317,7 @@ void Communication() {
String freq = data_str.substring(0, symPos);
freq = freq.substring(0, freq.length() - 1);
frequency = freq.toInt();
if (scandxmode) cancelDXScan();
radio.SetFreq(frequency);
if (afscreen) BuildAdvancedRDS();
radio.clearRDS(fullsearchrds);
@@ -527,6 +531,7 @@ void XDRGTKRoutine() {
break;
case 'M':
if (scandxmode) cancelDXScan();
byte XDRband;
XDRband = atol(buff + 1);
if (XDRband == 0) DataPrint("M0\n"); else DataPrint("M1\n");
@@ -567,6 +572,7 @@ void XDRGTKRoutine() {
break;
case 'T':
if (scandxmode) cancelDXScan();
unsigned int freqtemp;
freqtemp = atoi(buff + 1);
@@ -666,6 +672,7 @@ void XDRGTKRoutine() {
break;
case 'S':
if (scandxmode) cancelDXScan();
if (buff[1] == 'a') {
scanner_start = (atol(buff + 2) + 5) / 10;
} else if (buff[1] == 'b') {

View File

@@ -121,20 +121,22 @@
//MAIN COLORS /* RGB 565 CODES */
#define Black 0x0000 /* 0, 0, 0 */
#define BlackOlive 0x39E7 /* 7, 15, 7 */
#define Blue 0x001F /* 0, 0, 31 */
#define Cabbage 0x06D0 /* 0, 54, 16 */
#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 0x1082 /* 2, 4, 2 */
#define Deepsky 0x051F /* 0, 40, 31 */
#define Green 0x07E0 /* 0, 63, 0 */
#define Grey 0x7BEF /* 15, 31, 15 */
#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 Pink 0xFDBF /* 31, 45, 31 */
#define Purple 0xAA1C /* 21, 16, 28 */
#define Red 0xF800 /* 31, 0, 0 */
#define Sakura 0xF3D5 /* 30, 30, 21 */
@@ -160,6 +162,7 @@
#define OceanSmooth 0x0006 /* 0, 0, 6 */
#define MaroonSmooth 0x2001 /* 4, 0, 1 */
#define OrangeSmooth 0x3165 /* 6, 11, 5 */
#define PinkSmooth 0x620C /* 12, 16, 12 */
#define PurpleSmooth 0x2887 /* 5, 4, 7 */
#define RedSmooth 0x2000 /* 4, 0, 0 */
#define SakuraSmooth 0x3008 /* 6, 0, 8 */
@@ -187,6 +190,7 @@
#define CyanGrey 0x2A08 /* 5, 16, 8 */
#define Dallas 0x6A86 /* 13, 20, 6 */
#define DallasSmooth 0x3123 /* 6, 9, 3 */
#define EerieBlack 0x1825 /* 3, 1, 5 */
#define Electric 0x6016 /* 12, 0, 22 */
#define GreenDark 0x0200 /* 0, 16, 0 */
#define GreenGrey 0x2965 /* 5, 11, 5 */
@@ -206,130 +210,133 @@
#define Tyrian 0x3845 /* 7, 2, 5 */
// EEPROM index defines
#define EE_PRESETS_CNT 99 // When set > 99 change the complete EEPROM adressing!
#define EE_CHECKBYTE_VALUE 10 // 0 ~ 255,add new entry, change for new value
#define EE_PRESETS_FREQUENCY 0 // Default value when memory channel should be skipped!
#define EE_PRESETS_CNT 99 // When set > 99 change the complete EEPROM adressing!
#define EE_CHECKBYTE_VALUE 10 // 0 ~ 255,add new entry, change for new value
#define EE_PRESETS_FREQUENCY 0 // Default value when memory channel should be skipped!
#ifdef HAS_AIR_BAND
#define EE_TOTAL_CNT 2236 // Total occupied eeprom bytes
#define EE_TOTAL_CNT 2259 // Total occupied eeprom bytes
#else
#define EE_TOTAL_CNT 2230 // Total occupied eeprom bytes
#define EE_TOTAL_CNT 2254 // Total occupied eeprom bytes
#endif
#define EE_PRESETS_BAND_START 0 // 99 * 1 byte
#define EE_PRESET_BW_START 99 // 99 * 1 byte
#define EE_PRESET_MS_START 198 // 99 * 1 byte
#define EE_PRESETS_FREQUENCY_START 297 // 99 * 4 bytes
#define EE_PRESETS_RDSPI_START 693 // 99 * 5 bytes
#define EE_PRESETS_RDSPS_START 1188 // 99 * 9 bytes
#define EE_PRESETS_BAND_START 0 // 99 * 1 byte
#define EE_PRESET_BW_START 99 // 99 * 1 byte
#define EE_PRESET_MS_START 198 // 99 * 1 byte
#define EE_PRESETS_FREQUENCY_START 297 // 99 * 4 bytes
#define EE_PRESETS_RDSPI_START 693 // 99 * 5 bytes
#define EE_PRESETS_RDSPS_START 1188 // 99 * 9 bytes
#define EE_UINT16_FREQUENCY_FM 2079
#define EE_BYTE_VOLSET 2083
#define EE_BYTE_STEREO 2084
#define EE_BYTE_BANDFM 2085
#define EE_BYTE_BANDAM 2086
#define EE_UINT16_CONVERTERSET 2087
#define EE_UINT16_FMLOWEDGESET 2091
#define EE_UINT16_FMHIGHEDGESET 2095
#define EE_BYTE_CONTRASTSET 2099
#define EE_BYTE_STEREOLEVEL 2100
#define EE_BYTE_HIGHCUTLEVEL 2101
#define EE_BYTE_HIGHCUTOFFSET 2102
#define EE_BYTE_LEVELOFFSET 2103
#define EE_BYTE_RTBUFFER 2104
#define EE_BYTE_SORTAF 2105
#define EE_BYTE_STATIONLISTID 2106
#define EE_BYTE_EDGEBEEP 2107
#define EE_BYTE_SOFTMUTEAM 2108
#define EE_BYTE_SOFTMUTEFM 2109
#define EE_UINT16_FREQUENCY_AM 2110
#define EE_BYTE_LANGUAGE 2114
#define EE_BYTE_SHOWRDSERRORS 2115
#define EE_BYTE_TEF 2116
#define EE_BYTE_DISPLAYFLIP 2117
#define EE_BYTE_ROTARYMODE 2118
#define EE_BYTE_STEPSIZE 2119
#define EE_BYTE_TUNEMODE 2120
#define EE_BYTE_OPTENC 2121
#define EE_BYTE_CHECKBYTE 2122
#define EE_BYTE_IMSSET 2123
#define EE_BYTE_EQSET 2124
#define EE_BYTE_BAND 2125
#define EE_BYTE_LOWLEVELSET 2126
#define EE_BYTE_BWSET_FM 2127
#define EE_BYTE_BWSET_AM 2128
#define EE_BYTE_BANDAUTOSW 2129
#define EE_BYTE_MEMORYPOS 2130
#define EE_BYTE_REGION 2131
#define EE_BYTE_RDS_UNDERSCORE 2132
#define EE_BYTE_USBMODE 2133
#define EE_BYTE_WIFI 2134
#define EE_BYTE_SUBNETCLIENT 2135
#define EE_BYTE_SHOWSWMIBAND 2136
#define EE_BYTE_RDS_FILTER 2137
#define EE_BYTE_RDS_PIERRORS 2138
#define EE_BYTE_USESQUELCH 2139
#define EE_BYTE_SHOWMODULATION 2140
#define EE_BYTE_AM_NB 2141
#define EE_BYTE_FM_NB 2142
#define EE_BYTE_AUDIOMODE 2143
#define EE_BYTE_TOUCH_ROTATING 2144
#define EE_BYTE_HARDWARE_MODEL 2145
#define EE_BYTE_POWEROPTIONS 2146
#define EE_BYTE_CURRENTTHEME 2147
#define EE_BYTE_FMDEFAULTSTEPSIZE 2148
#define EE_BYTE_SCREENSAVERSET 2149
#define EE_BYTE_UNIT 2150
#define EE_BYTE_AF 2151
#define EE_BYTE_BATTERY_OPTIONS 2152
#define EE_BYTE_AM_CO_DECT 2153
#define EE_BYTE_AM_CO_DECT_COUNT 2154
#define EE_BYTE_AM_RF_GAIN 2155
#define EE_BYTE_FM_DEEMPHASIS 2156
#define EE_UINT16_FREQUENCY_LW 2157
#define EE_UINT16_FREQUENCY_MW 2161
#define EE_UINT16_FREQUENCY_SW 2165
#define EE_UINT16_LOWEDGEOIRTSET 2169
#define EE_UINT16_HIGHEDGEOIRTSET 2173
#define EE_INT16_AMLEVELOFFSET 2177
#define EE_UINT16_FREQUENCY_OIRT 2181
#define EE_STRING_XDRGTK_KEY 2185 // 11 byte
#define EE_BYTE_FASTPS 2196
#define EE_BYTE_TOT 2197
#define EE_BYTE_MWREGION 2198
#define EE_BYTE_SPISPEED 2199
#define EE_BYTE_AMSCANSENS 2200
#define EE_BYTE_FMSCANSENS 2201
#define EE_BYTE_FREQFONT 2202
#define EE_BYTE_SKIN 2203
#define EE_BYTE_XDRGTKMUTE 2204
#define EE_BYTE_FMAGC 2205
#define EE_BYTE_AMAGC 2206
#define EE_BYTE_FMSI 2207
#define EE_BYTE_SCANSTART 2208
#define EE_BYTE_SCANSTOP 2209
#define EE_BYTE_SCANHOLD 2210
#define EE_BYTE_SCANMEM 2211
#define EE_BYTE_SCANCANCEL 2212
#define EE_BYTE_SCANMUTE 2213
#define EE_BYTE_AUTOSQUELCH 2214
#define EE_BYTE_LONGBANDPRESS 2215
#define EE_BYTE_SHOWCLOCK 2216
#define EE_BYTE_SHOWLONGPS 2217
#define EE_UINT16_MEMSTARTFREQ 2218
#define EE_UINT16_MEMSTOPFREQ 2222
#define EE_BYTE_MEMSTARTPOS 2226
#define EE_BYTE_MEMSTOPPOS 2227
#define EE_BYTE_MEMPIONLY 2228
#define EE_BYTE_MEMDOUBLEPI 2229
#define EE_UINT16_FREQUENCY_FM 2079
#define EE_BYTE_VOLSET 2083
#define EE_BYTE_STEREO 2084
#define EE_BYTE_BANDFM 2085
#define EE_BYTE_BANDAM 2086
#define EE_UINT16_CONVERTERSET 2087
#define EE_UINT16_FMLOWEDGESET 2091
#define EE_UINT16_FMHIGHEDGESET 2095
#define EE_BYTE_CONTRASTSET 2099
#define EE_BYTE_STEREOLEVEL 2100
#define EE_BYTE_HIGHCUTLEVEL 2101
#define EE_BYTE_HIGHCUTOFFSET 2102
#define EE_BYTE_LEVELOFFSET 2103
#define EE_BYTE_RTBUFFER 2104
#define EE_BYTE_SORTAF 2105
#define EE_BYTE_STATIONLISTID 2106
#define EE_BYTE_EDGEBEEP 2107
#define EE_BYTE_SOFTMUTEAM 2108
#define EE_BYTE_SOFTMUTEFM 2109
#define EE_UINT16_FREQUENCY_AM 2110
#define EE_BYTE_LANGUAGE 2114
#define EE_BYTE_SHOWRDSERRORS 2115
#define EE_BYTE_TEF 2116
#define EE_BYTE_DISPLAYFLIP 2117
#define EE_BYTE_ROTARYMODE 2118
#define EE_BYTE_STEPSIZE 2119
#define EE_BYTE_TUNEMODE 2120
#define EE_BYTE_OPTENC 2121
#define EE_BYTE_CHECKBYTE 2122
#define EE_BYTE_IMSSET 2123
#define EE_BYTE_EQSET 2124
#define EE_BYTE_BAND 2125
#define EE_BYTE_LOWLEVELSET 2126
#define EE_BYTE_BWSET_FM 2127
#define EE_BYTE_BWSET_AM 2128
#define EE_BYTE_BANDAUTOSW 2129
#define EE_BYTE_MEMORYPOS 2130
#define EE_BYTE_REGION 2131
#define EE_BYTE_RDS_UNDERSCORE 2132
#define EE_BYTE_USBMODE 2133
#define EE_BYTE_WIFI 2134
#define EE_BYTE_SUBNETCLIENT 2135
#define EE_BYTE_SHOWSWMIBAND 2136
#define EE_BYTE_RDS_FILTER 2137
#define EE_BYTE_RDS_PIERRORS 2138
#define EE_BYTE_USESQUELCH 2139
#define EE_BYTE_SHOWMODULATION 2140
#define EE_BYTE_AM_NB 2141
#define EE_BYTE_FM_NB 2142
#define EE_BYTE_AUDIOMODE 2143
#define EE_BYTE_TOUCH_ROTATING 2144
#define EE_BYTE_HARDWARE_MODEL 2145
#define EE_BYTE_POWEROPTIONS 2146
#define EE_BYTE_CURRENTTHEME 2147
#define EE_BYTE_FMDEFAULTSTEPSIZE 2148
#define EE_BYTE_SCREENSAVERSET 2149
#define EE_BYTE_UNIT 2150
#define EE_BYTE_AF 2151
#define EE_BYTE_BATTERY_OPTIONS 2152
#define EE_BYTE_AM_CO_DECT 2153
#define EE_BYTE_AM_CO_DECT_COUNT 2154
#define EE_BYTE_AM_RF_GAIN 2155
#define EE_BYTE_FM_DEEMPHASIS 2156
#define EE_UINT16_FREQUENCY_LW 2157
#define EE_UINT16_FREQUENCY_MW 2161
#define EE_UINT16_FREQUENCY_SW 2165
#define EE_UINT16_LOWEDGEOIRTSET 2169
#define EE_UINT16_HIGHEDGEOIRTSET 2173
#define EE_INT16_AMLEVELOFFSET 2177
#define EE_UINT16_FREQUENCY_OIRT 2181
#define EE_STRING_XDRGTK_KEY 2185 // 11 byte
#define EE_BYTE_FASTPS 2196
#define EE_BYTE_TOT 2197
#define EE_BYTE_MWREGION 2198
#define EE_BYTE_SPISPEED 2199
#define EE_BYTE_AMSCANSENS 2200
#define EE_BYTE_FMSCANSENS 2201
#define EE_BYTE_FREQFONT 2202
#define EE_BYTE_SKIN 2203
#define EE_BYTE_XDRGTKMUTE 2204
#define EE_BYTE_FMAGC 2205
#define EE_BYTE_AMAGC 2206
#define EE_BYTE_FMSI 2207
#define EE_BYTE_SCANSTART 2208
#define EE_BYTE_SCANSTOP 2209
#define EE_BYTE_SCANHOLD 2210
#define EE_BYTE_SCANMEM 2211
#define EE_BYTE_SCANCANCEL 2212
#define EE_BYTE_SCANMUTE 2213
#define EE_BYTE_AUTOSQUELCH 2214
#define EE_BYTE_LONGBANDPRESS 2215
#define EE_BYTE_SHOWCLOCK 2216
#define EE_BYTE_SHOWLONGPS 2217
#define EE_UINT16_MEMSTARTFREQ 2218
#define EE_UINT16_MEMSTOPFREQ 2222
#define EE_BYTE_MEMSTARTPOS 2226
#define EE_BYTE_MEMSTOPPOS 2227
#define EE_BYTE_MEMPIONLY 2228
#define EE_BYTE_MEMDOUBLEPI 2229
#define EE_STRING_RABBITEARSUSER 2230
#define EE_STRING_RABBITEARSPASSWORD 2241
#define EE_BYTE_WAITONLYONSIGNAL 2253
#ifdef HAS_AIR_BAND
#define EE_BYTE_AIRSTEPSIZE 2230
#define EE_UINT16_FREQUENCY_AIR 2231
#define EE_BYTE_AIRSTEPSIZE 2254
#define EE_UINT16_FREQUENCY_AIR 2255
#endif
// End of EEPROM index defines
static const char* const unitString[] = {"dBμV", "dBf", "dBm"};
static const char* const FreqFont[] = {"Classic", "Roubenstil", "Motoya", "Aura2", "Comic", "Modern"};
static const char* const Theme[] = {"Essence", "Cyan", "Crimson", "Monochrome", "Volcano", "Dendro", "Sakura", "Whiteout", "Tangerine", "Ocean", "Indigo", "Maroon", "GoldBrite"};
static const char* const Theme[] = {"Essence", "Cyan", "Crimson", "Monochrome", "Volcano", "Dendro", "Sakura", "Whiteout", "Tangerine", "Ocean", "Indigo", "Maroon", "GoldBrite", "Bubblegum"};
static const char* const Skin[] = {"Essential"};
// Memory channel database
@@ -347,7 +354,7 @@ enum LONGBANDBUTTONPRESS {
};
enum AUTOMEMPIMODES {
MEMPI_OFF = 0, MEMPI_RANGE, MEMPI_FULL
MEMPI_OFF = 0, MEMPI_RANGE, MEMPI_FULL
};
enum SCAN_CANCEL {

View File

@@ -8,7 +8,7 @@
#include <cstring>
byte menuitem;
byte items[10] = {10, static_cast<byte>(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 8, 9};
byte items[10] = {10, static_cast<byte>(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 9, 9};
extern mem presets[];
bool setWiFiConnectParam = false;
@@ -20,8 +20,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
SecondaryColor = Skyblue;
SecondaryColorSmooth = SkyblueSmooth;
FrameColor = Blue;
// GreyoutColor = Darkgrey;
GreyoutColor = Lightgrey;
GreyoutColor = BlackOlive;
BackgroundColor = Black;
ActiveColor = White;
ActiveColorSmooth = WhiteSmooth;
@@ -111,7 +110,6 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
case 3: // Monochrome theme
PrimaryColor = White;
PrimaryColorSmooth = Black;
// SecondaryColor = PureGrey;
SecondaryColor = White;
SecondaryColorSmooth = Black;
FrameColor = GreenGrey;
@@ -129,7 +127,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
StereoColorSmooth = Black;
RDSColor = White;
RDSColorSmooth = Black;
RDSDropoutColor = PureGrey;
RDSDropoutColor = PaleGrey;
RDSDropoutColorSmooth = Black;
BarSignificantColor = Red;
BarInsignificantColor = Green;
@@ -397,8 +395,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
SecondaryColor = Skyblue;
SecondaryColorSmooth = SkyblueSmooth;
FrameColor = Blue;
// GreyoutColor = Darkgrey;
GreyoutColor = Lightgrey;
GreyoutColor = BlackOlive;
BackgroundColor = Black;
ActiveColor = White;
ActiveColorSmooth = WhiteSmooth;
@@ -423,6 +420,38 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
BatteryValueColor = Teal;
BatteryValueColorSmooth = Black;
break;
case 13: // Bubblegum
PrimaryColor = Cyan;
PrimaryColorSmooth = CyanSmooth;
SecondaryColor = Cherry;
SecondaryColorSmooth = CherrySmooth;
FrameColor = Electric;
GreyoutColor = Meteorite;
BackgroundColor = EerieBlack;
ActiveColor = White;
ActiveColorSmooth = WhiteSmooth;
FreqColor = Pink;
FreqColorSmooth = PinkSmooth;
SignificantColor = Purple;
SignificantColorSmooth = PurpleSmooth;
InsignificantColor = Cherry;
InsignificantColorSmooth = CherrySmooth;
StereoColor = Cherry;
StereoColorSmooth = CherrySmooth;
RDSColor = Teal;
RDSColorSmooth = TealSmooth;
RDSDropoutColor = Logan;
RDSDropoutColorSmooth = LoganSmooth;
BarSignificantColor = Coral;
BarInsignificantColor = Teal;
ModBarSignificantColor = Sakura;
ModBarInsignificantColor = Skyblue;
BWAutoColor = Violet;
BWAutoColorSmooth = VioletSmooth;
BatteryValueColor = Turquoise;
BatteryValueColorSmooth = CyanDarkSmooth;
break;
}
}
@@ -1456,6 +1485,15 @@ void ShowOneLine(byte position, byte item, bool selected) {
FullLineSprite.drawString(String(amscansens), 298, 2);
break;
case DXMODE:
FullLineSprite.setTextDatum(TL_DATUM);
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
FullLineSprite.drawString(removeNewline(myLanguage[language][281]), 6, 2);
FullLineSprite.setTextDatum(TR_DATUM);
FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
FullLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 298, 2);
break;
case AUTOMEM:
FullLineSprite.setTextDatum(TL_DATUM);
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
@@ -1706,9 +1744,9 @@ void BuildDisplay() {
tft.drawLine(53, 30, 53, 0, FrameColor);
tft.drawLine(89, 30, 89, 0, FrameColor);
tft.drawLine(158, 30, 158, 0, FrameColor);
tft.drawLine(20, 114, 204, 114, TFT_DARKGREY);
tft.drawLine(20, 114, 204, 114, Darkgrey);
if (!showmodulation) tft.drawLine(20, 143, 204, 143, GreyoutColor); else tft.drawLine(20, 143, 204, 143, TFT_DARKGREY);
if (!showmodulation) tft.drawLine(20, 143, 204, 143, GreyoutColor); else tft.drawLine(20, 143, 204, 143, Darkgrey);
for (byte segments = 0; segments < 94; segments++) {
if (segments > 54) {
if (((segments - 53) % 10) == 0) {
@@ -2664,6 +2702,13 @@ void MenuUp() {
OneBigLineSprite.drawString(String(fmscansens), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
case ITEM9:
scanholdonsignal = !scanholdonsignal;
OneBigLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
}
break;
@@ -3605,6 +3650,13 @@ void MenuDown() {
OneBigLineSprite.drawString(String(fmscansens), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
case ITEM9:
scanholdonsignal = !scanholdonsignal;
OneBigLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
}
break;
@@ -3780,24 +3832,25 @@ void DoMenu() {
tft.drawRoundRect(10, 6, 300, 230, 5, ActiveColor);
tft.fillRoundRect(12, 8, 296, 226, 5, BackgroundColor);
tftPrint(0, myLanguage[language][71], 155, 13, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, myLanguage[language][72], 155, 63, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, "PE5PVB", 155, 43, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "ohmytime", 145, 93, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "HyperDX", 145, 108, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "MCelliotG", 155, 93, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "andimik", 155, 108, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "DXHR05", 145, 123, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "NoobishSVK", 145, 138, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "yo2ldk", 155, 123, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "Justin_Peng(Portable)", 155, 138, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "Overland DX", 145, 153, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "elektronik232", 155, 153, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "KOTYA8", 145, 168, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "mrwish7", 155, 168, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "lxsxl", 145, 183, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "leryfm", 155, 183, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "marsel90-1", 145, 198, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "lawendel", 155, 198, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(0, myLanguage[language][72], 155, 55, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, "PE5PVB", 155, 38, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "ohmytime", 145, 80, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "HyperDX", 145, 95, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "MCelliotG", 155, 80, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "andimik", 155, 95, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "DXHR05", 145, 110, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "NoobishSVK", 145, 125, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "yo2ldk", 155, 110, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "Justin_Peng(Portable)", 155, 125, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "Overland DX", 145, 140, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "elektronik232", 155, 140, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "KOTYA8", 145, 155, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "mrwish7", 155, 155, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "lxsxl", 145, 170, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "leryfm", 155, 170, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "marsel90-1", 145, 185, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(-1, "lawendel", 155, 185, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "KB8U", 145, 200, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(0, "github.com/PE5PVB/TEF6686_ESP32", 155, 215, ActiveColor, ActiveColorSmooth, 16);
break;
}
@@ -4458,17 +4511,33 @@ void DoMenu() {
tftPrint(0, "http://192.168.4.1", 155, 174, PrimaryColor, PrimaryColorSmooth, 16);
char key [9];
XDRGTK_key.toCharArray(key, 9);
char rabbitearsuser [9];
RabbitearsUser.toCharArray(rabbitearsuser, 9);
char rabbitearspw [9];
RabbitearsPassword.toCharArray(rabbitearspw, 9);
UpdateFonts(1);
WiFiConnectParam XDRGTK_key_text("Set XDRGTK Password: (max 8 characters)");
WiFiConnectParam XDRGTK_key_input("XDRGTK_key", "Password", key, 9);
WiFiConnectParam RabbitearsUser_text("Set rabbitears.info live bandscan user ID");
WiFiConnectParam RabbitearsUser_input("RabbitearsUser", "ID", rabbitearsuser, 9);
WiFiConnectParam RabbitearsPassword_text("Set rabbitears.info password");
WiFiConnectParam RabbitearsPassword_input("RabbitearsPassword", "Password", rabbitearspw, 9);
if (!setWiFiConnectParam) {
wc.addParameter(&XDRGTK_key_text);
wc.addParameter(&XDRGTK_key_input);
wc.addParameter(&RabbitearsUser_text);
wc.addParameter(&RabbitearsUser_input);
wc.addParameter(&RabbitearsPassword_text);
wc.addParameter(&RabbitearsPassword_input);
setWiFiConnectParam = true;
}
wc.startConfigurationPortal(AP_WAIT);
XDRGTK_key = XDRGTK_key_input.getValue();
RabbitearsUser = RabbitearsUser_input.getValue();
RabbitearsPassword = RabbitearsPassword_input.getValue();
EEPROM.writeString(EE_STRING_XDRGTK_KEY, XDRGTK_key);
EEPROM.writeString(EE_STRING_RABBITEARSUSER, RabbitearsUser);
EEPROM.writeString(EE_STRING_RABBITEARSPASSWORD, RabbitearsPassword);
EEPROM.commit();
UpdateFonts(0);
wifi = true;
@@ -4574,6 +4643,13 @@ void DoMenu() {
OneBigLineSprite.drawString(String(fmscansens), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
case ITEM9:
Infoboxprint(myLanguage[language][281]);
OneBigLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
}
break;

View File

@@ -57,6 +57,7 @@ extern bool RDSstatusold;
extern bool rdsstereoold;
extern bool usesquelch;
extern bool scandxmode;
extern bool scanholdonsignal;
extern bool scanmem;
extern bool scanmute;
extern bool showclock;
@@ -196,6 +197,8 @@ extern String rds_clockold;
extern String stationIDold;
extern String stationStateold;
extern String XDRGTK_key;
extern String RabbitearsUser;
extern String RabbitearsPassword;
extern unsigned int ConverterSet;
extern unsigned int HighEdgeSet;
extern unsigned int LowEdgeSet;

View File

@@ -1,11 +1,11 @@
#ifndef LANGUAGE_H
#define LANGUAGE_H
#define VERSION "v2.11.3"
#define VERSION "v2.11.5"
// [number of languages][number of texts]
static const char* const myLanguage[18][281] PROGMEM = {
static const char* const myLanguage[18][282] PROGMEM = {
{ "English", // English
"Rotary direction changed", // 1
"Please release button", // 2
@@ -286,7 +286,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Nederlands", // Dutch
@@ -569,7 +570,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"gewist", // 277
"Voorkom dubbele PI", // 278
"Bereik", // 279
"Volledig" // 280
"Volledig", // 280
"Wachttijd alleen\nbij signaal" // 281
},
{ "Polski", // Polish
@@ -852,7 +854,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"wyczyszczono", // 277
"Unikaj podwójnego PI", // 278
"Zakres", // 279
"Pełne" // 280
"Pełne", // 280
"Wait time on\nsignal only" // 281
},
{ "Hrvatski", // Croatian
@@ -1135,7 +1138,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Ελληνικά", // Greek
@@ -1418,7 +1422,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"έγινε εκκαθάριση", // 277
"Αποφυγή διπλού PI", // 278
"Εύρος", // 279
"Πλήρης" // 280
"Πλήρης", // 280
"Αναμονή μόνο σε\nυπάρξη σήματος" // 281
},
{ "Română", // Romanian
@@ -1701,7 +1706,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Deutsch", // German
@@ -1984,7 +1990,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Český", // Czech
@@ -2267,7 +2274,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Magyar", // Hungarian
@@ -2550,7 +2558,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Français", // French
@@ -2833,7 +2842,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"effacé", // 277
"Prévenir double PI", // 278
"Plage", // 279
"Complet" // 280
"Complet", // 280
"Attendre que lorsque\nle signal existe" // 281
},
@@ -3117,7 +3127,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Русский", // Russian
@@ -3400,7 +3411,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Українська", // Ukranian
@@ -3683,7 +3695,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Italiano", // Italian
@@ -3966,7 +3979,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"Cancellate", // 277
"Evita PI duplicati", // 278
"Intervallo", // 279
"Piene" // 280
"Piene", // 280
"Wait time on\nsignal only" // 281
},
{ "Simplified Chinese", // Simplified Chinese
@@ -4249,7 +4263,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Norsk", // Norwegian
@@ -4532,7 +4547,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277
"Prevent double PI", // 278
"Range", // 279
"Full" // 280
"Full", // 280
"Wait time on\nsignal only" // 281
},
{ "Español", // Spanish
@@ -4815,7 +4831,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"borrado", // 277
"Prevenir doble PI", // 278
"Rango", // 279
"Completo" // 280
"Completo", // 280
"Tiempo de espera\ncuando la señal" // 281
},
@@ -5099,8 +5116,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"limpo", // 277
"Prevenir PI duplo", // 278
"Intervalo", // 279
"Completo" // 280
"Completo", // 280
"Espera tempo apenas\nquando sinal" // 281
}
};
#endif
#endif