From c77a84c0d49ff1036536b20450476aecb7170d9b Mon Sep 17 00:00:00 2001 From: Russell Dwarshuis Date: Fri, 30 Aug 2024 08:46:41 -0400 Subject: [PATCH 01/22] Send DX scan results to rabbitears.info map for North America --- TEF6686_ESP32.ino | 67 +++++++++++++++++++++++++++++++++++++++++++++++ src/constants.h | 12 +++++---- src/gui.cpp | 18 ++++++++++++- src/gui.h | 2 ++ 4 files changed, 93 insertions(+), 6 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 583fe1d..dfe7a44 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -1,6 +1,7 @@ #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" #include +#include #include #include #include @@ -214,6 +215,7 @@ byte spispeed; char buff[16]; char eonpicodeold[20][6]; char programTypePrevious[18]; +char rabbitearstime[100][21]; const uint8_t* currentFont = nullptr; float vPerold; int ActiveColor; @@ -308,6 +310,8 @@ String PIold; String PSold; String ptynold = " "; String PTYold; +String RabbitearsPassword; +String RabbitearsUser; String rds_clock; String rds_clockold; String RDSSPYRDS; @@ -326,6 +330,7 @@ String XDRGTKRDS; String XDRGTKRDSold; uint16_t BW; uint16_t MStatus; +uint16_t rabbitearspi[100]; // first is for 88.1, 2nd 88.3, etc. to 107.9 MHz uint16_t SWMIBandPos; uint16_t SWMIBandPosold; uint16_t USN; @@ -481,6 +486,8 @@ void setup() { frequency_AIR = EEPROM.readUInt(EE_UINT16_FREQUENCY_AIR); #endif XDRGTK_key = EEPROM.readString(EE_STRING_XDRGTK_KEY); + RabbitearsUser = EEPROM.readString(EE_STRING_RABBITEARSUSER); + RabbitearsPassword = EEPROM.readString(EE_STRING_RABBITEARSPASSWORD); usesquelch = EEPROM.readByte(EE_BYTE_USESQUELCH); showmodulation = EEPROM.readByte(EE_BYTE_SHOWMODULATION); amnb = EEPROM.readByte(EE_BYTE_AM_NB); @@ -880,6 +887,13 @@ void loop() { } delay(100); radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + if (RabbitearsUser.length() && RabbitearsPassword.length() && region == REGION_US && radio.rds.correctPI != 0 && frequency >= 8810 && frequency <= 10790 && !(frequency % 10) && ((frequency/10) % 2)) { + byte i = (frequency / 10 - 881) / 2; + if (!rabbitearspi[i]) { + rabbitearspi[i] = radio.rds.correctPI; + rtc.getTime("%FT%TZ").toCharArray(rabbitearstime[i],21); // ISO8601 format like 2024-08-24T12:52:00Z + } + } if (!initdxscan) { switch (scancancel) { case CORRECTPI: if (RDSstatus && radio.rds.correctPI != 0) cancelDXScan(); break; @@ -3900,6 +3914,22 @@ void TuneUp() { if (fmdefaultstepsize == 2 && stepsize == 0 && frequency == 8795) frequency = 8790; if (frequency >= (HighEdgeSet * 10) + 1) { + if (scandxmode && RabbitearsUser.length() && RabbitearsPassword.length()) { + byte i = 0; + bool hasreport = false; + for(i=0; i<100; i++) { + if (rabbitearspi[i]) { + hasreport = true; + break; + } + } + if (hasreport) { + rabbitearssend(); + for (i=0; i< 100; i++) { + rabbitearspi[i] = 0; + } + } + } frequency = LowEdgeSet * 10; if (fmdefaultstepsize == 2 && stepsize == 0 && frequency == 8750) frequency = 8775; if (edgebeep) EdgeBeeper(); @@ -4238,6 +4268,8 @@ void DefaultSettings(byte userhardwaremodel) { EEPROM.writeUInt(EE_UINT16_FREQUENCY_AIR, 135350); #endif EEPROM.writeString(EE_STRING_XDRGTK_KEY, "password"); + EEPROM.writeString(EE_STRING_RABBITEARSUSER, ""); + EEPROM.writeString(EE_STRING_RABBITEARSPASSWORD, ""); if (userhardwaremodel == BASE_ILI9341) EEPROM.writeByte(EE_BYTE_USESQUELCH, 1); else EEPROM.writeByte(EE_BYTE_USESQUELCH, 0); EEPROM.writeByte(EE_BYTE_SHOWMODULATION, 1); EEPROM.writeByte(EE_BYTE_AM_NB, 0); @@ -4546,6 +4578,10 @@ void endMenu() { void startFMDXScan() { initdxscan = true; + for(byte i=0; i<100; i++) { + rabbitearspi[i] = 0; + rabbitearstime[i][0] = 0; + } if (menu) endMenu(); if (afscreen || advancedRDS) BuildDisplay(); @@ -4581,6 +4617,37 @@ void startFMDXScan() { if (XDRGTKUSB || XDRGTKTCP) DataPrint("J1\n"); } +void rabbitearssend () { + if(WiFi.status() != WL_CONNECTED) return; + String RabbitearsURL = "http://rabbitears.info/tvdx/fm_spot"; + WiFiClient RabbitearsClient; + HTTPClient http; + byte i; + String json = String("{\"tuner_key\":\""); + json += RabbitearsUser; + json += String("\",\"password\":\""); + json += RabbitearsPassword; + json += String("\","); + json += String("\"signal\":{"); + for (i=0; i <100; i++) { + if (rabbitearspi[i]) { + json += String("\""); + json += String((i*2+881)*100000); + json += String("\":{\"time\":\""); + json += String(rabbitearstime[i]); + json += String("\",\"pi_code\":"); + json += String(rabbitearspi[i]); + json += String("},"); + } + } + json.remove(json.length()-1); // remove trailing comma + json += String("}}"); + http.begin(RabbitearsClient,RabbitearsURL.c_str()); + http.addHeader("Content-Type", "application/json"); + http.POST(json); + http.end(); +} + void setAutoSpeedSPI() { switch (frequency / 10) { case 875 ... 877: tft.setSPISpeed(28); break; diff --git a/src/constants.h b/src/constants.h index d1ab402..30c5ab1 100644 --- a/src/constants.h +++ b/src/constants.h @@ -209,9 +209,9 @@ #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 2258 // Total occupied eeprom bytes #else -#define EE_TOTAL_CNT 2230 // Total occupied eeprom bytes +#define EE_TOTAL_CNT 2253 // Total occupied eeprom bytes #endif #define EE_PRESETS_BAND_START 0 // 99 * 1 byte @@ -320,9 +320,11 @@ #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 #ifdef HAS_AIR_BAND -#define EE_BYTE_AIRSTEPSIZE 2230 -#define EE_UINT16_FREQUENCY_AIR 2231 +#define EE_BYTE_AIRSTEPSIZE 2252 +#define EE_UINT16_FREQUENCY_AIR 2253 #endif // End of EEPROM index defines @@ -678,4 +680,4 @@ static const uint16_t openradiologo[] PROGMEM = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbdf7, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0x39c7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x42e6, 0x76ef, 0xa6cf, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x7ecf, 0x5be9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xce59, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xef5d, 0x3186, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc618, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x9492, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5367, 0x76ef, 0x9e6e, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x1962, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x31a6, 0xef7d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xef5d, 0x4228, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad75, 0xf7be, 0xffff, 0xffff, 0xffff, 0xffff, 0xef7d, 0x94b2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2183, 0x5be8, 0x76ef, 0x95ed, 0x9e8f, 0xa6ef, 0xa730, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0xa730, 0xa6f0, 0x9e8f, 0x962e, 0x76ef, 0x76ef, 0x3aa5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4208, 0xd6ba, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xd6ba, 0x2965, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; \ No newline at end of file +}; diff --git a/src/gui.cpp b/src/gui.cpp index 2a241e9..53997b9 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -4455,17 +4455,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; @@ -4728,4 +4744,4 @@ String removeNewline(String inputString) { } } return outputString; -} \ No newline at end of file +} diff --git a/src/gui.h b/src/gui.h index 69bb606..b46d1a7 100644 --- a/src/gui.h +++ b/src/gui.h @@ -196,6 +196,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; From 8ba879435cc0232fe6e01328b8407e978f6e4aa5 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 15:32:13 +0200 Subject: [PATCH 02/22] Added option Wait time on signal only to dx scanner --- TEF6686_ESP32.ino | 42 ++++++--- src/constants.h | 233 +++++++++++++++++++++++----------------------- src/gui.cpp | 34 ++++++- src/gui.h | 1 + src/language.h | 59 +++++++----- 5 files changed, 217 insertions(+), 152 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index dfe7a44..608a255 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -101,6 +101,7 @@ bool RDSstatusold; bool rdsstereoold; bool rtcset; bool scandxmode; +bool scanholdonsignal; bool scanmem; bool scanmute; bool screenmute; @@ -545,6 +546,7 @@ void setup() { memstoppos = EEPROM.readByte(EE_BYTE_MEMSTOPPOS); mempionly = EEPROM.readByte(EE_BYTE_MEMPIONLY); memdoublepi = EEPROM.readByte(EE_BYTE_MEMDOUBLEPI); + scanholdonsignal = EEPROM.readByte(EE_BYTE_WAITONLYONSIGNAL); if (spispeed == SPI_SPEED_DEFAULT) { tft.setSPISpeed(SPI_FREQUENCY / 1000000); @@ -852,7 +854,12 @@ void loop() { } if (scandxmode) { - if (millis() >= scantimer + (scanhold == 0 ? 500 : (scanhold * 1000))) { + unsigned long waitTime = (scanhold == 0) ? 500 : (scanhold * 1000); + bool signalCondition = (USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80) && (OStatus > -80); + bool bypassMillisCheck = scanholdonsignal && !signalCondition; + bool shouldScan = bypassMillisCheck || (!bypassMillisCheck && (millis() >= scantimer + waitTime)); + + if (shouldScan) { if (scanmem) { memorypos++; if (memorypos > scanstop) memorypos = scanstart; @@ -885,19 +892,26 @@ void loop() { } flashingtimer = millis(); } + delay(100); radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); - if (RabbitearsUser.length() && RabbitearsPassword.length() && region == REGION_US && radio.rds.correctPI != 0 && frequency >= 8810 && frequency <= 10790 && !(frequency % 10) && ((frequency/10) % 2)) { + + if (RabbitearsUser.length() && RabbitearsPassword.length() && region == REGION_US && radio.rds.correctPI != 0 && frequency >= 8810 && frequency <= 10790 && !(frequency % 10) && ((frequency / 10) % 2)) { byte i = (frequency / 10 - 881) / 2; if (!rabbitearspi[i]) { rabbitearspi[i] = radio.rds.correctPI; - rtc.getTime("%FT%TZ").toCharArray(rabbitearstime[i],21); // ISO8601 format like 2024-08-24T12:52:00Z + rtc.getTime("%FT%TZ").toCharArray(rabbitearstime[i], 21); } } + if (!initdxscan) { switch (scancancel) { - case CORRECTPI: if (RDSstatus && radio.rds.correctPI != 0) cancelDXScan(); break; - case SIGNAL: if ((USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80 && OStatus > -80)) cancelDXScan(); break; + case CORRECTPI: + if (RDSstatus && radio.rds.correctPI != 0) cancelDXScan(); + break; + case SIGNAL: + if (signalCondition) cancelDXScan(); + break; } } } @@ -3917,7 +3931,7 @@ void TuneUp() { if (scandxmode && RabbitearsUser.length() && RabbitearsPassword.length()) { byte i = 0; bool hasreport = false; - for(i=0; i<100; i++) { + for (i = 0; i < 100; i++) { if (rabbitearspi[i]) { hasreport = true; break; @@ -3925,7 +3939,7 @@ void TuneUp() { } if (hasreport) { rabbitearssend(); - for (i=0; i< 100; i++) { + for (i = 0; i < 100; i++) { rabbitearspi[i] = 0; } } @@ -4328,6 +4342,7 @@ void DefaultSettings(byte userhardwaremodel) { EEPROM.writeByte(EE_BYTE_MEMSTOPPOS, 10); EEPROM.writeByte(EE_BYTE_MEMPIONLY, 1); EEPROM.writeByte(EE_BYTE_MEMDOUBLEPI, 0); + EEPROM.writeByte(EE_BYTE_WAITONLYONSIGNAL, 1); for (int i = 0; i < EE_PRESETS_CNT; i++) { EEPROM.writeByte(i + EE_PRESETS_BAND_START, BAND_FM); @@ -4564,6 +4579,7 @@ void endMenu() { EEPROM.writeByte(EE_BYTE_MEMSTOPPOS, memstoppos); EEPROM.writeByte(EE_BYTE_MEMPIONLY, mempionly); EEPROM.writeByte(EE_BYTE_MEMDOUBLEPI, memdoublepi); + EEPROM.writeByte(EE_BYTE_WAITONLYONSIGNAL, scanholdonsignal); EEPROM.commit(); if (af == 2) radio.rds.afreg = true; else radio.rds.afreg = false; Serial.end(); @@ -4578,7 +4594,7 @@ void endMenu() { void startFMDXScan() { initdxscan = true; - for(byte i=0; i<100; i++) { + for (byte i = 0; i < 100; i++) { rabbitearspi[i] = 0; rabbitearstime[i][0] = 0; } @@ -4618,7 +4634,7 @@ void startFMDXScan() { } void rabbitearssend () { - if(WiFi.status() != WL_CONNECTED) return; + if (WiFi.status() != WL_CONNECTED) return; String RabbitearsURL = "http://rabbitears.info/tvdx/fm_spot"; WiFiClient RabbitearsClient; HTTPClient http; @@ -4629,10 +4645,10 @@ void rabbitearssend () { json += RabbitearsPassword; json += String("\","); json += String("\"signal\":{"); - for (i=0; i <100; i++) { + for (i = 0; i < 100; i++) { if (rabbitearspi[i]) { json += String("\""); - json += String((i*2+881)*100000); + json += String((i * 2 + 881) * 100000); json += String("\":{\"time\":\""); json += String(rabbitearstime[i]); json += String("\",\"pi_code\":"); @@ -4640,9 +4656,9 @@ void rabbitearssend () { json += String("},"); } } - json.remove(json.length()-1); // remove trailing comma + json.remove(json.length() - 1); // remove trailing comma json += String("}}"); - http.begin(RabbitearsClient,RabbitearsURL.c_str()); + http.begin(RabbitearsClient, RabbitearsURL.c_str()); http.addHeader("Content-Type", "application/json"); http.POST(json); http.end(); diff --git a/src/constants.h b/src/constants.h index 30c5ab1..f989f4a 100644 --- a/src/constants.h +++ b/src/constants.h @@ -205,126 +205,127 @@ #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 2258 // Total occupied eeprom bytes +#define EE_TOTAL_CNT 2259 // Total occupied eeprom bytes #else -#define EE_TOTAL_CNT 2253 // 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_STRING_RABBITEARSUSER 2230 -#define EE_STRING_RABBITEARSPASSWORD 2241 +#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 2252 -#define EE_UINT16_FREQUENCY_AIR 2253 +#define EE_BYTE_AIRSTEPSIZE 2254 +#define EE_UINT16_FREQUENCY_AIR 2255 #endif // End of EEPROM index defines @@ -348,7 +349,7 @@ enum LONGBANDBUTTONPRESS { }; enum AUTOMEMPIMODES { - MEMPI_OFF = 0, MEMPI_RANGE, MEMPI_FULL + MEMPI_OFF = 0, MEMPI_RANGE, MEMPI_FULL }; enum SCAN_CANCEL { @@ -680,4 +681,4 @@ static const uint16_t openradiologo[] PROGMEM = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbdf7, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0x39c7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x42e6, 0x76ef, 0xa6cf, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x7ecf, 0x5be9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xce59, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xef5d, 0x3186, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc618, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x9492, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5367, 0x76ef, 0x9e6e, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x1962, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x31a6, 0xef7d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xef5d, 0x4228, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad75, 0xf7be, 0xffff, 0xffff, 0xffff, 0xffff, 0xef7d, 0x94b2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2183, 0x5be8, 0x76ef, 0x95ed, 0x9e8f, 0xa6ef, 0xa730, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0x76ef, 0xa730, 0xa6f0, 0x9e8f, 0x962e, 0x76ef, 0x76ef, 0x3aa5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4208, 0xd6ba, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xd6ba, 0x2965, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; +}; \ No newline at end of file diff --git a/src/gui.cpp b/src/gui.cpp index 53997b9..35d65b6 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -8,7 +8,7 @@ #include byte menuitem; -byte items[10] = {10, static_cast(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 8, 9}; +byte items[10] = {10, static_cast(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 9, 9}; extern mem presets[]; bool setWiFiConnectParam = false; @@ -1453,6 +1453,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); @@ -2661,6 +2670,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; @@ -3602,6 +3618,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; @@ -4587,6 +4610,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; @@ -4744,4 +4774,4 @@ String removeNewline(String inputString) { } } return outputString; -} +} \ No newline at end of file diff --git a/src/gui.h b/src/gui.h index b46d1a7..2e972f6 100644 --- a/src/gui.h +++ b/src/gui.h @@ -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; diff --git a/src/language.h b/src/language.h index 2265ff8..c0320f4 100644 --- a/src/language.h +++ b/src/language.h @@ -5,7 +5,7 @@ // [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 + "Wait time on\nsignal only" // 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 + "Wait time on\nsignal only" // 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 + "Wait time on\nsignal only" // 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 + "Wait time on\nsignal only" // 281 } }; -#endif +#endif \ No newline at end of file From 10fefe2692d73ff37b0b2eaac24ed5fdd7827494 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 15:36:59 +0200 Subject: [PATCH 03/22] Fix: Always cancel fmdxscanner when tune command is received --- src/comms.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/comms.cpp b/src/comms.cpp index 77eab5a..05785b7 100644 --- a/src/comms.cpp +++ b/src/comms.cpp @@ -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(); @@ -314,6 +316,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 +530,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 +571,7 @@ void XDRGTKRoutine() { break; case 'T': + if (scandxmode) cancelDXScan(); unsigned int freqtemp; freqtemp = atoi(buff + 1); @@ -666,6 +671,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') { From 09582a9842abf75b9f0cbccb7700198d62b50efc Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 15:51:25 +0200 Subject: [PATCH 04/22] Versioning --- src/gui.cpp | 37 +++++++++++++++++++------------------ src/language.h | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index 35d65b6..6ebd3f9 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -3800,24 +3800,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; } diff --git a/src/language.h b/src/language.h index c0320f4..4f238b3 100644 --- a/src/language.h +++ b/src/language.h @@ -1,7 +1,7 @@ #ifndef LANGUAGE_H #define LANGUAGE_H -#define VERSION "v2.11.3" +#define VERSION "v2.11.4" // [number of languages][number of texts] From b965fa767ee2ec28f9f7ac1befd8d0c39660459a Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:34:56 -0400 Subject: [PATCH 05/22] Update USA_87-90.csv --- data/USA_87-90.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/USA_87-90.csv b/data/USA_87-90.csv index 7290956..649de4e 100644 --- a/data/USA_87-90.csv +++ b/data/USA_87-90.csv @@ -796,7 +796,7 @@ 21869;8850;WAHP;SC 21881;8850;WAIB;NY 22004;8850;WAMU;DC -22027;8850;WANR;NY +560;8850;WANR;NY 22463;8850;WBEL;IL 22554;8850;WBHY;AL 22670;8850;WBMK;KY From 805fa9ca13791148affb70f71b55b13c3f7cf154 Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:37:00 -0400 Subject: [PATCH 06/22] Update USA_94-96.csv --- data/USA_94-96.csv | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/USA_94-96.csv b/data/USA_94-96.csv index 67d182c..77c8dca 100644 --- a/data/USA_94-96.csv +++ b/data/USA_94-96.csv @@ -188,14 +188,14 @@ 53848;9410;K231DC;CA 53854;9410;K231CS;NV 53859;9410;W231AO;GA -53878;9410;W231DJ;CT +29111;9410;W231DJ;CT 53884;9410;W231AK;MA 53886;9410;K231CR;CA 53899;9410;W231BQ;VT 53918;9410;W231EG;OH 53937;9410;W231AS;WI 53943;9410;K231BE;TX -53952;9410;W231BW;NH +31653;9410;W231BW;NH 53953;9410;W231DF;AL 53968;9410;W231AJ;OH 53969;9410;K231BW;WY @@ -491,7 +491,7 @@ 54296;9430;W232DB;GA 54306;9430;K232FT;AR 54318;9430;K232GA;MN -54320;9430;W232AM;PA +36076;9430;W232AM;PA 54333;9430;K232AM;CA 54344;9430;K262DG;TX 54355;9430;W232DR;PR @@ -698,7 +698,7 @@ 53740;9450;K233CH;CO 53765;9450;K233AN;NE 53767;9450;W233BT;IN -53801;9450;W233CF;CT +53978;9450;W233CF;CT 53821;9450;W233AN;IN 53858;9450;W233AH;NY 53917;9450;K233DG;AZ @@ -937,7 +937,7 @@ 54136;9470;K234DA;TX 54142;9470;K234DE;TX 54177;9470;K234AD;OR -54197;9470;W234AX;PA +24503;9470;W234AX;PA 54208;9470;W234CF;NC 54227;9470;W234CC;IL 54256;9470;K234CG;KS @@ -1396,7 +1396,7 @@ 54588;9510;W236DC;TN 54603;9510;W236DB;IL 54612;9510;K236CT;OK -54627;9510;W236CT;NJ +65535;9510;W236CT;NJ 54721;9510;W236DQ;VA 54760;9510;W236DI;MD 61441;9510;WQMZ;VA @@ -2395,4 +2395,4 @@ 54703;9590;K240FD;NE 54708;9590;W240EJ;MS 54741;9590;W240DS;NC -54782;9590;W240DZ;OH \ No newline at end of file +54782;9590;W240DZ;OH From f56eb451df6160a291a85195662e4767b48702ca Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:38:39 -0400 Subject: [PATCH 07/22] Update USA_96-98.csv --- data/USA_96-98.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/USA_96-98.csv b/data/USA_96-98.csv index d58cec3..e5d2a87 100644 --- a/data/USA_96-98.csv +++ b/data/USA_96-98.csv @@ -1552,7 +1552,7 @@ 53726;9730;W247BL;OH 53752;9730;K247BD;UT 53753;9730;K247CN;CA -53757;9730;W247AE;PA +36272;9730;W247AE;PA 53773;9730;W247AM;MI 53774;9730;K247BC;WY 53792;9730;W247CQ;VA @@ -2325,4 +2325,4 @@ 54751;9790;W250CR;VA 54761;9790;W250CU;WV 54782;9790;K250BP;MT -65280;9790;W250AZ;NC \ No newline at end of file +65280;9790;W250AZ;NC From e0111f9acbdf2b5d2874e2f7a86af2b34523a45a Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:39:27 -0400 Subject: [PATCH 08/22] Update USA_98-100.csv --- data/USA_98-100.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/USA_98-100.csv b/data/USA_98-100.csv index 888fa4a..3a13c38 100644 --- a/data/USA_98-100.csv +++ b/data/USA_98-100.csv @@ -1136,7 +1136,7 @@ 54385;9890;W255CZ;WI 54396;9890;K255DG;ND 54400;9890;W255BE;NC -54408;9890;W255BO;PA +26045;9890;W255BO;PA 54429;9890;W255DR;SC 54432;9890;W255BH;IN 54444;9890;W255DI;MI @@ -1641,7 +1641,7 @@ 54340;9930;W257DS;AL 54344;9930;K257ER;AK 54348;9930;K256DI;ID -54362;9930;W257AI;PA +36076;9930;W257AI;PA 54366;9930;K257AY;UT 54381;9930;K257FM;NV 54385;9930;K257GM;KS @@ -2356,4 +2356,4 @@ 54585;9990;W260DV;PA 54661;9990;W260DJ;VA 54685;9990;W260DC;RI -54721;9990;W260DS;MA \ No newline at end of file +54721;9990;W260DS;MA From 3d2c47a1a333d440075335c00ccde6e5be363b0f Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:40:50 -0400 Subject: [PATCH 09/22] Update USA_100-102.csv --- data/USA_100-102.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/USA_100-102.csv b/data/USA_100-102.csv index a09522d..8dc2042 100644 --- a/data/USA_100-102.csv +++ b/data/USA_100-102.csv @@ -674,7 +674,7 @@ 54380;10050;K263BC;TX 54388;10050;W263DC;NY 54422;10050;W263CF;MS -54431;10050;W263AL;PA +42541;10050;W263AL;PA 54477;10050;W263BA;NC 54488;10050;W263BT;FL 54490;10050;W263BI;FL @@ -1584,7 +1584,7 @@ 54148;10130;K267AU;UT 54149;10130;K267AD;OR 54152;10130;K267CM;CO -54153;10130;W267BP;NJ +36546;10130;W267BP;NJ 54181;10130;W267BA;VA 54188;10130;K267BE;MT 54209;10130;W267BV;MN @@ -2314,7 +2314,7 @@ 53700;10190;W270AF;TN 53711;10190;W270CW;WI 53722;10190;W270BH;IN -53727;10190;W270DV;NJ +36546;10190;W270DV;NJ 53748;10190;W270DS;NH 53769;10190;K270CT;WY 53794;10190;W270BY;NY @@ -2380,4 +2380,4 @@ 54695;10190;W270DA;VA 54759;10190;W270DD;TN 54760;10190;K270CW;AZ -54764;10190;K270CX;NV \ No newline at end of file +54764;10190;K270CX;NV From b344d3fb2690834e824421ccd6ef845ce76c7d3b Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:41:58 -0400 Subject: [PATCH 10/22] Update USA_102-104.csv --- data/USA_102-104.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/USA_102-104.csv b/data/USA_102-104.csv index 8086c1f..48b872a 100644 --- a/data/USA_102-104.csv +++ b/data/USA_102-104.csv @@ -1379,7 +1379,7 @@ 54107;10310;W276BV;CT 54130;10310;K276EH;MN 54136;10310;K276GE;ID -54151;10310;W276DG;PA +29575;10310;W276DG;PA 54172;10310;W276DV;FL 54182;10310;K276BL;NV 54192;10310;W276BJ;NH @@ -2367,4 +2367,4 @@ 54731;10390;W280FW;KY 54737;10390;W280FG;PA 54755;10390;W280EM;IL -54762;10390;W280FL;OH \ No newline at end of file +54762;10390;W280FL;OH From d7e6ffa28e757ae970264ac1f5246f4efca2acd3 Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:42:48 -0400 Subject: [PATCH 11/22] Update USA_104-106.csv --- data/USA_104-106.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/USA_104-106.csv b/data/USA_104-106.csv index c1aaf47..696eaa9 100644 --- a/data/USA_104-106.csv +++ b/data/USA_104-106.csv @@ -98,7 +98,7 @@ 30808;10410;WNNK;PA 31316;10410;WOGY;TN 31686;10410;WOVE;NC -31974;10410;W281BH;NJ +42643;10410;W281BH;NJ 32272;10410;WPRS;MD 32435;10410;WPXZ;PA 32446;10410;WPYK;OH @@ -1122,7 +1122,7 @@ 54241;10490;W285FD;NC 54243;10490;K285GL;KS 54248;10490;K285FX;MN -54291;10490;W285DH;PA +37623;10490;W285DH;PA 54310;10490;K285FU;AK 54323;10490;W285EP;GA 54329;10490;K285EW;CA @@ -1793,7 +1793,7 @@ 53890;10550;W288DJ;OH 53892;10550;K288EM;MT 53894;10550;K288GQ;TX -53913;10550;W288DF;PA +25049;10550;W288DF;PA 53944;10550;K288AN;UT 53948;10550;W288AI;MN 53952;10550;K288HB;SD @@ -2277,4 +2277,4 @@ 54506;10590;W290DT;KY 54570;10590;W290DR;MI 54606;10590;K290CW;LA -54724;10590;K290CT;CA \ No newline at end of file +54724;10590;K290CT;CA From 7b75cabe088f0249da215699c68a60edde5f0564 Mon Sep 17 00:00:00 2001 From: Asher <36462882+asherrf@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:44:03 -0400 Subject: [PATCH 12/22] Update USA_106-108.csv --- data/USA_106-108.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/USA_106-108.csv b/data/USA_106-108.csv index 036ae09..79f0000 100644 --- a/data/USA_106-108.csv +++ b/data/USA_106-108.csv @@ -326,7 +326,7 @@ 28165;10630;WJPT;FL 28173;10630;WGHR;FL 28190;10630;W292EX;MS -28228;10630;WJSE;NJ +28228;10630;WKOE;NJ 28481;10630;WKBX;GA 28754;10630;WKMK;NJ 29634;10630;WLUG;AL @@ -2365,4 +2365,4 @@ 54662;10790;W300DS;VA 54685;10790;W300ED;KY 54687;10790;K300EA;MN -54783;10790;W300DQ;PA \ No newline at end of file +54783;10790;W300DQ;PA From e568bcc15ca70478be307554701a1bc1cf669078 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 18:59:35 +0200 Subject: [PATCH 13/22] Fixed one forgotten cancel DXscan command on remote tuning --- src/comms.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comms.cpp b/src/comms.cpp index 05785b7..2dee999 100644 --- a/src/comms.cpp +++ b/src/comms.cpp @@ -141,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) { From 6da4c44158ae99a0d99ef359a549211b56a89089 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 20:16:27 +0200 Subject: [PATCH 14/22] Fixed bug in auto memory with double PI check enabled --- TEF6686_ESP32.ino | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 608a255..d9175e6 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -4752,9 +4752,9 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui dostore = true; if (doublepi != 0) { for (byte x = (doublepi == 1 ? startmem : 0); x <= (doublepi == 1 ? stopmem : EE_PRESETS_CNT - 1); x++) { - if (presets[memorypos].RDSPI[0] != '\0') { + if (presets[x].RDSPI[0] != '\0') { for (byte i = 0; i < 4; i++) { - if (presets[memorypos].RDSPI[i] != radio.rds.picode[i]) { + if (presets[x].RDSPI[i] != radio.rds.picode[i]) { dostore = false; break; } @@ -4877,6 +4877,19 @@ void ClearMemoryRange(uint8_t start, uint8_t stop) { for (uint8_t pos = start; pos <= stop; pos++) { EEPROM.writeByte(pos + EE_PRESETS_BAND_START, BAND_FM); EEPROM.writeUInt((pos * 4) + EE_PRESETS_FREQUENCY_START, EE_PRESETS_FREQUENCY); + EEPROM.writeByte(pos + EE_PRESET_BW_START, 0); + EEPROM.writeByte(pos + EE_PRESET_MS_START, 1); + + for (int y = 0; y < 9; y++) { + EEPROM.writeByte((pos * 9) + y + EE_PRESETS_RDSPS_START, '\0'); + presets[pos].RDSPS[y] = '\0'; + } + + for (int y = 0; y < 5; y++) { + EEPROM.writeByte((pos * 5) + y + EE_PRESETS_RDSPI_START, '\0'); + presets[pos].RDSPI[y] = '\0'; + } + EEPROM.commit(); presets[pos].band = BAND_FM; presets[pos].frequency = EE_PRESETS_FREQUENCY; From 19d9fc9f326ea773a44426b9ee1e7b612e8899d0 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 20:23:48 +0200 Subject: [PATCH 15/22] Fix: Respect holdtime on DX scanner even when signal drops out --- TEF6686_ESP32.ino | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index d9175e6..bb153c3 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -101,6 +101,7 @@ bool RDSstatusold; bool rdsstereoold; bool rtcset; bool scandxmode; +bool scanholdflag; bool scanholdonsignal; bool scanmem; bool scanmute; @@ -855,11 +856,12 @@ void loop() { if (scandxmode) { unsigned long waitTime = (scanhold == 0) ? 500 : (scanhold * 1000); - bool signalCondition = (USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80) && (OStatus > -80); - bool bypassMillisCheck = scanholdonsignal && !signalCondition; + if (!scanholdflag) scanholdflag = (USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80) && (OStatus > -80); + bool bypassMillisCheck = scanholdonsignal && !scanholdflag; bool shouldScan = bypassMillisCheck || (!bypassMillisCheck && (millis() >= scantimer + waitTime)); if (shouldScan) { + scanholdflag = false; if (scanmem) { memorypos++; if (memorypos > scanstop) memorypos = scanstart; @@ -910,7 +912,7 @@ void loop() { if (RDSstatus && radio.rds.correctPI != 0) cancelDXScan(); break; case SIGNAL: - if (signalCondition) cancelDXScan(); + if (scanhold) cancelDXScan(); break; } } @@ -4594,6 +4596,7 @@ void endMenu() { void startFMDXScan() { initdxscan = true; + scanholdflag = false; for (byte i = 0; i < 100; i++) { rabbitearspi[i] = 0; rabbitearstime[i][0] = 0; From 8834f5f37ff22818fc3f3827892b0f1687db4b01 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 20:27:56 +0200 Subject: [PATCH 16/22] Fixed problem with slow update while holding on DX scanner --- TEF6686_ESP32.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index bb153c3..7f2bb28 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -895,7 +895,7 @@ void loop() { flashingtimer = millis(); } - delay(100); + if (!scanholdflag) delay(100); radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); if (RabbitearsUser.length() && RabbitearsPassword.length() && region == REGION_US && radio.rds.correctPI != 0 && frequency >= 8810 && frequency <= 10790 && !(frequency % 10) && ((frequency / 10) % 2)) { From 1199e3cf5980dec4f6e405edfa420506c4969baa Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 31 Aug 2024 20:33:31 +0200 Subject: [PATCH 17/22] Unmute audio when signal is found in fmdx scanner --- TEF6686_ESP32.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 7f2bb28..167879c 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -861,6 +861,7 @@ void loop() { bool shouldScan = bypassMillisCheck || (!bypassMillisCheck && (millis() >= scantimer + waitTime)); if (shouldScan) { + if (scanmute && scanholdonsignal) radio.setMute(); scanholdflag = false; if (scanmem) { memorypos++; @@ -881,6 +882,8 @@ void loop() { } scantimer = millis(); initdxscan = false; + } else { + if (scanmute && scanholdonsignal) radio.setUnMute(); } if (millis() >= flashingtimer + 500) { From 532c4ef37ebaa9af83ba7b0e6271d1c4a821b9b2 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Sun, 1 Sep 2024 02:56:13 +0300 Subject: [PATCH 18/22] Add files via upload --- TEF6686_ESP32.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 167879c..428926e 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -1075,7 +1075,7 @@ void loop() { tftPrint(-1, "PS:", 3, 193, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "RT:", 3, 221, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "PTY:", 3, 163, ActiveColor, ActiveColorSmooth, 16); - 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); } LowLevelInit = true; } From 5df425a79197eacb8dbb102e61e0dd58928b64ce Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Sun, 1 Sep 2024 02:57:00 +0300 Subject: [PATCH 19/22] Some theme tweaks, added new theme --- src/constants.h | 8 ++++++-- src/gui.cpp | 40 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/constants.h b/src/constants.h index f989f4a..1697628 100644 --- a/src/constants.h +++ b/src/constants.h @@ -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 */ @@ -159,6 +161,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 */ @@ -186,6 +189,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 */ @@ -331,7 +335,7 @@ 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 diff --git a/src/gui.cpp b/src/gui.cpp index 6ebd3f9..083a5f4 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -20,7 +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 = BlackOlive; BackgroundColor = Black; ActiveColor = White; ActiveColorSmooth = WhiteSmooth; @@ -395,7 +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 = BlackOlive; BackgroundColor = Black; ActiveColor = White; ActiveColorSmooth = WhiteSmooth; @@ -420,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; } } @@ -1712,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) { From aaa72c1c88f4bc8cba764126672cdca9744e7018 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sun, 1 Sep 2024 18:31:12 +0200 Subject: [PATCH 20/22] Mod on double PI checker --- TEF6686_ESP32.ino | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 428926e..d673950 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -4759,12 +4759,19 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui if (doublepi != 0) { for (byte x = (doublepi == 1 ? startmem : 0); x <= (doublepi == 1 ? stopmem : EE_PRESETS_CNT - 1); x++) { if (presets[x].RDSPI[0] != '\0') { + bool allMatch = true; + for (byte i = 0; i < 4; i++) { if (presets[x].RDSPI[i] != radio.rds.picode[i]) { - dostore = false; + allMatch = false; break; } } + + if (allMatch) { + dostore = false; + break; + } } } } From ba2ae1aa99973695f04b48fe4fd00513af46c2d2 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sun, 1 Sep 2024 22:01:02 +0200 Subject: [PATCH 21/22] Versioning --- src/language.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/language.h b/src/language.h index 4f238b3..b22dc66 100644 --- a/src/language.h +++ b/src/language.h @@ -1,7 +1,7 @@ #ifndef LANGUAGE_H #define LANGUAGE_H -#define VERSION "v2.11.4" +#define VERSION "v2.11.5" // [number of languages][number of texts] From cb447367ab609589461427fb1d797ea504f78138 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Mon, 2 Sep 2024 21:28:16 +0300 Subject: [PATCH 22/22] Monochrome theme fixes and translation updates --- src/gui.cpp | 4 ++-- src/language.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index 083a5f4..0fbc1a3 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -110,7 +110,7 @@ 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; GreyoutColor = PaleGrey; @@ -127,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; diff --git a/src/language.h b/src/language.h index b22dc66..b2caefb 100644 --- a/src/language.h +++ b/src/language.h @@ -1423,7 +1423,7 @@ static const char* const myLanguage[18][282] PROGMEM = { "Αποφυγή διπλού PI", // 278 "Εύρος", // 279 "Πλήρης", // 280 - "Wait time on\nsignal only" // 281 + "Αναμονή μόνο σε\nυπάρξη σήματος" // 281 }, { "Română", // Romanian @@ -2843,7 +2843,7 @@ static const char* const myLanguage[18][282] PROGMEM = { "Prévenir double PI", // 278 "Plage", // 279 "Complet", // 280 - "Wait time on\nsignal only" // 281 + "Attendre que lorsque\nle signal existe" // 281 }, @@ -4832,7 +4832,7 @@ static const char* const myLanguage[18][282] PROGMEM = { "Prevenir doble PI", // 278 "Rango", // 279 "Completo", // 280 - "Wait time on\nsignal only" // 281 + "Tiempo de espera\ncuando la señal" // 281 }, @@ -5117,7 +5117,7 @@ static const char* const myLanguage[18][282] PROGMEM = { "Prevenir PI duplo", // 278 "Intervalo", // 279 "Completo", // 280 - "Wait time on\nsignal only" // 281 + "Espera tempo apenas\nquando sinal" // 281 } }; #endif \ No newline at end of file