Added option Wait time on signal only to dx scanner

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-08-31 15:32:13 +02:00
parent 0165476cbb
commit 8ba879435c
5 changed files with 217 additions and 152 deletions
+29 -13
View File
@@ -101,6 +101,7 @@ bool RDSstatusold;
bool rdsstereoold; bool rdsstereoold;
bool rtcset; bool rtcset;
bool scandxmode; bool scandxmode;
bool scanholdonsignal;
bool scanmem; bool scanmem;
bool scanmute; bool scanmute;
bool screenmute; bool screenmute;
@@ -545,6 +546,7 @@ void setup() {
memstoppos = EEPROM.readByte(EE_BYTE_MEMSTOPPOS); memstoppos = EEPROM.readByte(EE_BYTE_MEMSTOPPOS);
mempionly = EEPROM.readByte(EE_BYTE_MEMPIONLY); mempionly = EEPROM.readByte(EE_BYTE_MEMPIONLY);
memdoublepi = EEPROM.readByte(EE_BYTE_MEMDOUBLEPI); memdoublepi = EEPROM.readByte(EE_BYTE_MEMDOUBLEPI);
scanholdonsignal = EEPROM.readByte(EE_BYTE_WAITONLYONSIGNAL);
if (spispeed == SPI_SPEED_DEFAULT) { if (spispeed == SPI_SPEED_DEFAULT) {
tft.setSPISpeed(SPI_FREQUENCY / 1000000); tft.setSPISpeed(SPI_FREQUENCY / 1000000);
@@ -852,7 +854,12 @@ void loop() {
} }
if (scandxmode) { 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) { if (scanmem) {
memorypos++; memorypos++;
if (memorypos > scanstop) memorypos = scanstart; if (memorypos > scanstop) memorypos = scanstart;
@@ -885,19 +892,26 @@ void loop() {
} }
flashingtimer = millis(); flashingtimer = millis();
} }
delay(100); delay(100);
radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); 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; byte i = (frequency / 10 - 881) / 2;
if (!rabbitearspi[i]) { if (!rabbitearspi[i]) {
rabbitearspi[i] = radio.rds.correctPI; 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) { if (!initdxscan) {
switch (scancancel) { switch (scancancel) {
case CORRECTPI: if (RDSstatus && radio.rds.correctPI != 0) cancelDXScan(); break; case CORRECTPI:
case SIGNAL: if ((USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80 && OStatus > -80)) cancelDXScan(); break; 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()) { if (scandxmode && RabbitearsUser.length() && RabbitearsPassword.length()) {
byte i = 0; byte i = 0;
bool hasreport = false; bool hasreport = false;
for(i=0; i<100; i++) { for (i = 0; i < 100; i++) {
if (rabbitearspi[i]) { if (rabbitearspi[i]) {
hasreport = true; hasreport = true;
break; break;
@@ -3925,7 +3939,7 @@ void TuneUp() {
} }
if (hasreport) { if (hasreport) {
rabbitearssend(); rabbitearssend();
for (i=0; i< 100; i++) { for (i = 0; i < 100; i++) {
rabbitearspi[i] = 0; rabbitearspi[i] = 0;
} }
} }
@@ -4328,6 +4342,7 @@ void DefaultSettings(byte userhardwaremodel) {
EEPROM.writeByte(EE_BYTE_MEMSTOPPOS, 10); EEPROM.writeByte(EE_BYTE_MEMSTOPPOS, 10);
EEPROM.writeByte(EE_BYTE_MEMPIONLY, 1); EEPROM.writeByte(EE_BYTE_MEMPIONLY, 1);
EEPROM.writeByte(EE_BYTE_MEMDOUBLEPI, 0); EEPROM.writeByte(EE_BYTE_MEMDOUBLEPI, 0);
EEPROM.writeByte(EE_BYTE_WAITONLYONSIGNAL, 1);
for (int i = 0; i < EE_PRESETS_CNT; i++) { for (int i = 0; i < EE_PRESETS_CNT; i++) {
EEPROM.writeByte(i + EE_PRESETS_BAND_START, BAND_FM); 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_MEMSTOPPOS, memstoppos);
EEPROM.writeByte(EE_BYTE_MEMPIONLY, mempionly); EEPROM.writeByte(EE_BYTE_MEMPIONLY, mempionly);
EEPROM.writeByte(EE_BYTE_MEMDOUBLEPI, memdoublepi); EEPROM.writeByte(EE_BYTE_MEMDOUBLEPI, memdoublepi);
EEPROM.writeByte(EE_BYTE_WAITONLYONSIGNAL, scanholdonsignal);
EEPROM.commit(); EEPROM.commit();
if (af == 2) radio.rds.afreg = true; else radio.rds.afreg = false; if (af == 2) radio.rds.afreg = true; else radio.rds.afreg = false;
Serial.end(); Serial.end();
@@ -4578,7 +4594,7 @@ void endMenu() {
void startFMDXScan() { void startFMDXScan() {
initdxscan = true; initdxscan = true;
for(byte i=0; i<100; i++) { for (byte i = 0; i < 100; i++) {
rabbitearspi[i] = 0; rabbitearspi[i] = 0;
rabbitearstime[i][0] = 0; rabbitearstime[i][0] = 0;
} }
@@ -4618,7 +4634,7 @@ void startFMDXScan() {
} }
void rabbitearssend () { void rabbitearssend () {
if(WiFi.status() != WL_CONNECTED) return; if (WiFi.status() != WL_CONNECTED) return;
String RabbitearsURL = "http://rabbitears.info/tvdx/fm_spot"; String RabbitearsURL = "http://rabbitears.info/tvdx/fm_spot";
WiFiClient RabbitearsClient; WiFiClient RabbitearsClient;
HTTPClient http; HTTPClient http;
@@ -4629,10 +4645,10 @@ void rabbitearssend () {
json += RabbitearsPassword; json += RabbitearsPassword;
json += String("\","); json += String("\",");
json += String("\"signal\":{"); json += String("\"signal\":{");
for (i=0; i <100; i++) { for (i = 0; i < 100; i++) {
if (rabbitearspi[i]) { if (rabbitearspi[i]) {
json += String("\""); json += String("\"");
json += String((i*2+881)*100000); json += String((i * 2 + 881) * 100000);
json += String("\":{\"time\":\""); json += String("\":{\"time\":\"");
json += String(rabbitearstime[i]); json += String(rabbitearstime[i]);
json += String("\",\"pi_code\":"); json += String("\",\"pi_code\":");
@@ -4640,9 +4656,9 @@ void rabbitearssend () {
json += String("},"); json += String("},");
} }
} }
json.remove(json.length()-1); // remove trailing comma json.remove(json.length() - 1); // remove trailing comma
json += String("}}"); json += String("}}");
http.begin(RabbitearsClient,RabbitearsURL.c_str()); http.begin(RabbitearsClient, RabbitearsURL.c_str());
http.addHeader("Content-Type", "application/json"); http.addHeader("Content-Type", "application/json");
http.POST(json); http.POST(json);
http.end(); http.end();
+117 -116
View File
@@ -205,126 +205,127 @@
#define Tyrian 0x3845 /* 7, 2, 5 */ #define Tyrian 0x3845 /* 7, 2, 5 */
// EEPROM index defines // EEPROM index defines
#define EE_PRESETS_CNT 99 // When set > 99 change the complete EEPROM adressing! #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_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_FREQUENCY 0 // Default value when memory channel should be skipped!
#ifdef HAS_AIR_BAND #ifdef HAS_AIR_BAND
#define EE_TOTAL_CNT 2258 // Total occupied eeprom bytes #define EE_TOTAL_CNT 2259 // Total occupied eeprom bytes
#else #else
#define EE_TOTAL_CNT 2253 // Total occupied eeprom bytes #define EE_TOTAL_CNT 2254 // Total occupied eeprom bytes
#endif #endif
#define EE_PRESETS_BAND_START 0 // 99 * 1 byte #define EE_PRESETS_BAND_START 0 // 99 * 1 byte
#define EE_PRESET_BW_START 99 // 99 * 1 byte #define EE_PRESET_BW_START 99 // 99 * 1 byte
#define EE_PRESET_MS_START 198 // 99 * 1 byte #define EE_PRESET_MS_START 198 // 99 * 1 byte
#define EE_PRESETS_FREQUENCY_START 297 // 99 * 4 bytes #define EE_PRESETS_FREQUENCY_START 297 // 99 * 4 bytes
#define EE_PRESETS_RDSPI_START 693 // 99 * 5 bytes #define EE_PRESETS_RDSPI_START 693 // 99 * 5 bytes
#define EE_PRESETS_RDSPS_START 1188 // 99 * 9 bytes #define EE_PRESETS_RDSPS_START 1188 // 99 * 9 bytes
#define EE_UINT16_FREQUENCY_FM 2079 #define EE_UINT16_FREQUENCY_FM 2079
#define EE_BYTE_VOLSET 2083 #define EE_BYTE_VOLSET 2083
#define EE_BYTE_STEREO 2084 #define EE_BYTE_STEREO 2084
#define EE_BYTE_BANDFM 2085 #define EE_BYTE_BANDFM 2085
#define EE_BYTE_BANDAM 2086 #define EE_BYTE_BANDAM 2086
#define EE_UINT16_CONVERTERSET 2087 #define EE_UINT16_CONVERTERSET 2087
#define EE_UINT16_FMLOWEDGESET 2091 #define EE_UINT16_FMLOWEDGESET 2091
#define EE_UINT16_FMHIGHEDGESET 2095 #define EE_UINT16_FMHIGHEDGESET 2095
#define EE_BYTE_CONTRASTSET 2099 #define EE_BYTE_CONTRASTSET 2099
#define EE_BYTE_STEREOLEVEL 2100 #define EE_BYTE_STEREOLEVEL 2100
#define EE_BYTE_HIGHCUTLEVEL 2101 #define EE_BYTE_HIGHCUTLEVEL 2101
#define EE_BYTE_HIGHCUTOFFSET 2102 #define EE_BYTE_HIGHCUTOFFSET 2102
#define EE_BYTE_LEVELOFFSET 2103 #define EE_BYTE_LEVELOFFSET 2103
#define EE_BYTE_RTBUFFER 2104 #define EE_BYTE_RTBUFFER 2104
#define EE_BYTE_SORTAF 2105 #define EE_BYTE_SORTAF 2105
#define EE_BYTE_STATIONLISTID 2106 #define EE_BYTE_STATIONLISTID 2106
#define EE_BYTE_EDGEBEEP 2107 #define EE_BYTE_EDGEBEEP 2107
#define EE_BYTE_SOFTMUTEAM 2108 #define EE_BYTE_SOFTMUTEAM 2108
#define EE_BYTE_SOFTMUTEFM 2109 #define EE_BYTE_SOFTMUTEFM 2109
#define EE_UINT16_FREQUENCY_AM 2110 #define EE_UINT16_FREQUENCY_AM 2110
#define EE_BYTE_LANGUAGE 2114 #define EE_BYTE_LANGUAGE 2114
#define EE_BYTE_SHOWRDSERRORS 2115 #define EE_BYTE_SHOWRDSERRORS 2115
#define EE_BYTE_TEF 2116 #define EE_BYTE_TEF 2116
#define EE_BYTE_DISPLAYFLIP 2117 #define EE_BYTE_DISPLAYFLIP 2117
#define EE_BYTE_ROTARYMODE 2118 #define EE_BYTE_ROTARYMODE 2118
#define EE_BYTE_STEPSIZE 2119 #define EE_BYTE_STEPSIZE 2119
#define EE_BYTE_TUNEMODE 2120 #define EE_BYTE_TUNEMODE 2120
#define EE_BYTE_OPTENC 2121 #define EE_BYTE_OPTENC 2121
#define EE_BYTE_CHECKBYTE 2122 #define EE_BYTE_CHECKBYTE 2122
#define EE_BYTE_IMSSET 2123 #define EE_BYTE_IMSSET 2123
#define EE_BYTE_EQSET 2124 #define EE_BYTE_EQSET 2124
#define EE_BYTE_BAND 2125 #define EE_BYTE_BAND 2125
#define EE_BYTE_LOWLEVELSET 2126 #define EE_BYTE_LOWLEVELSET 2126
#define EE_BYTE_BWSET_FM 2127 #define EE_BYTE_BWSET_FM 2127
#define EE_BYTE_BWSET_AM 2128 #define EE_BYTE_BWSET_AM 2128
#define EE_BYTE_BANDAUTOSW 2129 #define EE_BYTE_BANDAUTOSW 2129
#define EE_BYTE_MEMORYPOS 2130 #define EE_BYTE_MEMORYPOS 2130
#define EE_BYTE_REGION 2131 #define EE_BYTE_REGION 2131
#define EE_BYTE_RDS_UNDERSCORE 2132 #define EE_BYTE_RDS_UNDERSCORE 2132
#define EE_BYTE_USBMODE 2133 #define EE_BYTE_USBMODE 2133
#define EE_BYTE_WIFI 2134 #define EE_BYTE_WIFI 2134
#define EE_BYTE_SUBNETCLIENT 2135 #define EE_BYTE_SUBNETCLIENT 2135
#define EE_BYTE_SHOWSWMIBAND 2136 #define EE_BYTE_SHOWSWMIBAND 2136
#define EE_BYTE_RDS_FILTER 2137 #define EE_BYTE_RDS_FILTER 2137
#define EE_BYTE_RDS_PIERRORS 2138 #define EE_BYTE_RDS_PIERRORS 2138
#define EE_BYTE_USESQUELCH 2139 #define EE_BYTE_USESQUELCH 2139
#define EE_BYTE_SHOWMODULATION 2140 #define EE_BYTE_SHOWMODULATION 2140
#define EE_BYTE_AM_NB 2141 #define EE_BYTE_AM_NB 2141
#define EE_BYTE_FM_NB 2142 #define EE_BYTE_FM_NB 2142
#define EE_BYTE_AUDIOMODE 2143 #define EE_BYTE_AUDIOMODE 2143
#define EE_BYTE_TOUCH_ROTATING 2144 #define EE_BYTE_TOUCH_ROTATING 2144
#define EE_BYTE_HARDWARE_MODEL 2145 #define EE_BYTE_HARDWARE_MODEL 2145
#define EE_BYTE_POWEROPTIONS 2146 #define EE_BYTE_POWEROPTIONS 2146
#define EE_BYTE_CURRENTTHEME 2147 #define EE_BYTE_CURRENTTHEME 2147
#define EE_BYTE_FMDEFAULTSTEPSIZE 2148 #define EE_BYTE_FMDEFAULTSTEPSIZE 2148
#define EE_BYTE_SCREENSAVERSET 2149 #define EE_BYTE_SCREENSAVERSET 2149
#define EE_BYTE_UNIT 2150 #define EE_BYTE_UNIT 2150
#define EE_BYTE_AF 2151 #define EE_BYTE_AF 2151
#define EE_BYTE_BATTERY_OPTIONS 2152 #define EE_BYTE_BATTERY_OPTIONS 2152
#define EE_BYTE_AM_CO_DECT 2153 #define EE_BYTE_AM_CO_DECT 2153
#define EE_BYTE_AM_CO_DECT_COUNT 2154 #define EE_BYTE_AM_CO_DECT_COUNT 2154
#define EE_BYTE_AM_RF_GAIN 2155 #define EE_BYTE_AM_RF_GAIN 2155
#define EE_BYTE_FM_DEEMPHASIS 2156 #define EE_BYTE_FM_DEEMPHASIS 2156
#define EE_UINT16_FREQUENCY_LW 2157 #define EE_UINT16_FREQUENCY_LW 2157
#define EE_UINT16_FREQUENCY_MW 2161 #define EE_UINT16_FREQUENCY_MW 2161
#define EE_UINT16_FREQUENCY_SW 2165 #define EE_UINT16_FREQUENCY_SW 2165
#define EE_UINT16_LOWEDGEOIRTSET 2169 #define EE_UINT16_LOWEDGEOIRTSET 2169
#define EE_UINT16_HIGHEDGEOIRTSET 2173 #define EE_UINT16_HIGHEDGEOIRTSET 2173
#define EE_INT16_AMLEVELOFFSET 2177 #define EE_INT16_AMLEVELOFFSET 2177
#define EE_UINT16_FREQUENCY_OIRT 2181 #define EE_UINT16_FREQUENCY_OIRT 2181
#define EE_STRING_XDRGTK_KEY 2185 // 11 byte #define EE_STRING_XDRGTK_KEY 2185 // 11 byte
#define EE_BYTE_FASTPS 2196 #define EE_BYTE_FASTPS 2196
#define EE_BYTE_TOT 2197 #define EE_BYTE_TOT 2197
#define EE_BYTE_MWREGION 2198 #define EE_BYTE_MWREGION 2198
#define EE_BYTE_SPISPEED 2199 #define EE_BYTE_SPISPEED 2199
#define EE_BYTE_AMSCANSENS 2200 #define EE_BYTE_AMSCANSENS 2200
#define EE_BYTE_FMSCANSENS 2201 #define EE_BYTE_FMSCANSENS 2201
#define EE_BYTE_FREQFONT 2202 #define EE_BYTE_FREQFONT 2202
#define EE_BYTE_SKIN 2203 #define EE_BYTE_SKIN 2203
#define EE_BYTE_XDRGTKMUTE 2204 #define EE_BYTE_XDRGTKMUTE 2204
#define EE_BYTE_FMAGC 2205 #define EE_BYTE_FMAGC 2205
#define EE_BYTE_AMAGC 2206 #define EE_BYTE_AMAGC 2206
#define EE_BYTE_FMSI 2207 #define EE_BYTE_FMSI 2207
#define EE_BYTE_SCANSTART 2208 #define EE_BYTE_SCANSTART 2208
#define EE_BYTE_SCANSTOP 2209 #define EE_BYTE_SCANSTOP 2209
#define EE_BYTE_SCANHOLD 2210 #define EE_BYTE_SCANHOLD 2210
#define EE_BYTE_SCANMEM 2211 #define EE_BYTE_SCANMEM 2211
#define EE_BYTE_SCANCANCEL 2212 #define EE_BYTE_SCANCANCEL 2212
#define EE_BYTE_SCANMUTE 2213 #define EE_BYTE_SCANMUTE 2213
#define EE_BYTE_AUTOSQUELCH 2214 #define EE_BYTE_AUTOSQUELCH 2214
#define EE_BYTE_LONGBANDPRESS 2215 #define EE_BYTE_LONGBANDPRESS 2215
#define EE_BYTE_SHOWCLOCK 2216 #define EE_BYTE_SHOWCLOCK 2216
#define EE_BYTE_SHOWLONGPS 2217 #define EE_BYTE_SHOWLONGPS 2217
#define EE_UINT16_MEMSTARTFREQ 2218 #define EE_UINT16_MEMSTARTFREQ 2218
#define EE_UINT16_MEMSTOPFREQ 2222 #define EE_UINT16_MEMSTOPFREQ 2222
#define EE_BYTE_MEMSTARTPOS 2226 #define EE_BYTE_MEMSTARTPOS 2226
#define EE_BYTE_MEMSTOPPOS 2227 #define EE_BYTE_MEMSTOPPOS 2227
#define EE_BYTE_MEMPIONLY 2228 #define EE_BYTE_MEMPIONLY 2228
#define EE_BYTE_MEMDOUBLEPI 2229 #define EE_BYTE_MEMDOUBLEPI 2229
#define EE_STRING_RABBITEARSUSER 2230 #define EE_STRING_RABBITEARSUSER 2230
#define EE_STRING_RABBITEARSPASSWORD 2241 #define EE_STRING_RABBITEARSPASSWORD 2241
#define EE_BYTE_WAITONLYONSIGNAL 2253
#ifdef HAS_AIR_BAND #ifdef HAS_AIR_BAND
#define EE_BYTE_AIRSTEPSIZE 2252 #define EE_BYTE_AIRSTEPSIZE 2254
#define EE_UINT16_FREQUENCY_AIR 2253 #define EE_UINT16_FREQUENCY_AIR 2255
#endif #endif
// End of EEPROM index defines // End of EEPROM index defines
@@ -348,7 +349,7 @@ enum LONGBANDBUTTONPRESS {
}; };
enum AUTOMEMPIMODES { enum AUTOMEMPIMODES {
MEMPI_OFF = 0, MEMPI_RANGE, MEMPI_FULL MEMPI_OFF = 0, MEMPI_RANGE, MEMPI_FULL
}; };
enum SCAN_CANCEL { 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, 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, 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 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
}; };
+32 -2
View File
@@ -8,7 +8,7 @@
#include <cstring> #include <cstring>
byte menuitem; 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[]; extern mem presets[];
bool setWiFiConnectParam = false; bool setWiFiConnectParam = false;
@@ -1453,6 +1453,15 @@ void ShowOneLine(byte position, byte item, bool selected) {
FullLineSprite.drawString(String(amscansens), 298, 2); FullLineSprite.drawString(String(amscansens), 298, 2);
break; 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: case AUTOMEM:
FullLineSprite.setTextDatum(TL_DATUM); FullLineSprite.setTextDatum(TL_DATUM);
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
@@ -2661,6 +2670,13 @@ void MenuUp() {
OneBigLineSprite.drawString(String(fmscansens), 135, 0); OneBigLineSprite.drawString(String(fmscansens), 135, 0);
OneBigLineSprite.pushSprite(24, 118); OneBigLineSprite.pushSprite(24, 118);
break; break;
case ITEM9:
scanholdonsignal = !scanholdonsignal;
OneBigLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
} }
break; break;
@@ -3602,6 +3618,13 @@ void MenuDown() {
OneBigLineSprite.drawString(String(fmscansens), 135, 0); OneBigLineSprite.drawString(String(fmscansens), 135, 0);
OneBigLineSprite.pushSprite(24, 118); OneBigLineSprite.pushSprite(24, 118);
break; break;
case ITEM9:
scanholdonsignal = !scanholdonsignal;
OneBigLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
} }
break; break;
@@ -4587,6 +4610,13 @@ void DoMenu() {
OneBigLineSprite.drawString(String(fmscansens), 135, 0); OneBigLineSprite.drawString(String(fmscansens), 135, 0);
OneBigLineSprite.pushSprite(24, 118); OneBigLineSprite.pushSprite(24, 118);
break; break;
case ITEM9:
Infoboxprint(myLanguage[language][281]);
OneBigLineSprite.drawString((scanholdonsignal ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
OneBigLineSprite.pushSprite(24, 118);
break;
} }
break; break;
@@ -4744,4 +4774,4 @@ String removeNewline(String inputString) {
} }
} }
return outputString; return outputString;
} }
+1
View File
@@ -57,6 +57,7 @@ extern bool RDSstatusold;
extern bool rdsstereoold; extern bool rdsstereoold;
extern bool usesquelch; extern bool usesquelch;
extern bool scandxmode; extern bool scandxmode;
extern bool scanholdonsignal;
extern bool scanmem; extern bool scanmem;
extern bool scanmute; extern bool scanmute;
extern bool showclock; extern bool showclock;
+38 -21
View File
@@ -5,7 +5,7 @@
// [number of languages][number of texts] // [number of languages][number of texts]
static const char* const myLanguage[18][281] PROGMEM = { static const char* const myLanguage[18][282] PROGMEM = {
{ "English", // English { "English", // English
"Rotary direction changed", // 1 "Rotary direction changed", // 1
"Please release button", // 2 "Please release button", // 2
@@ -286,7 +286,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Nederlands", // Dutch { "Nederlands", // Dutch
@@ -569,7 +570,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"gewist", // 277 "gewist", // 277
"Voorkom dubbele PI", // 278 "Voorkom dubbele PI", // 278
"Bereik", // 279 "Bereik", // 279
"Volledig" // 280 "Volledig", // 280
"Wachttijd alleen\nbij signaal" // 281
}, },
{ "Polski", // Polish { "Polski", // Polish
@@ -852,7 +854,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"wyczyszczono", // 277 "wyczyszczono", // 277
"Unikaj podwójnego PI", // 278 "Unikaj podwójnego PI", // 278
"Zakres", // 279 "Zakres", // 279
"Pełne" // 280 "Pełne", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Hrvatski", // Croatian { "Hrvatski", // Croatian
@@ -1135,7 +1138,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Ελληνικά", // Greek { "Ελληνικά", // Greek
@@ -1418,7 +1422,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"έγινε εκκαθάριση", // 277 "έγινε εκκαθάριση", // 277
"Αποφυγή διπλού PI", // 278 "Αποφυγή διπλού PI", // 278
"Εύρος", // 279 "Εύρος", // 279
"Πλήρης" // 280 "Πλήρης", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Română", // Romanian { "Română", // Romanian
@@ -1701,7 +1706,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Deutsch", // German { "Deutsch", // German
@@ -1984,7 +1990,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Český", // Czech { "Český", // Czech
@@ -2267,7 +2274,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Magyar", // Hungarian { "Magyar", // Hungarian
@@ -2550,7 +2558,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Français", // French { "Français", // French
@@ -2833,7 +2842,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"effacé", // 277 "effacé", // 277
"Prévenir double PI", // 278 "Prévenir double PI", // 278
"Plage", // 279 "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 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Русский", // Russian { "Русский", // Russian
@@ -3400,7 +3411,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Українська", // Ukranian { "Українська", // Ukranian
@@ -3683,7 +3695,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Italiano", // Italian { "Italiano", // Italian
@@ -3966,7 +3979,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"Cancellate", // 277 "Cancellate", // 277
"Evita PI duplicati", // 278 "Evita PI duplicati", // 278
"Intervallo", // 279 "Intervallo", // 279
"Piene" // 280 "Piene", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Simplified Chinese", // Simplified Chinese { "Simplified Chinese", // Simplified Chinese
@@ -4249,7 +4263,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Norsk", // Norwegian { "Norsk", // Norwegian
@@ -4532,7 +4547,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"cleared", // 277 "cleared", // 277
"Prevent double PI", // 278 "Prevent double PI", // 278
"Range", // 279 "Range", // 279
"Full" // 280 "Full", // 280
"Wait time on\nsignal only" // 281
}, },
{ "Español", // Spanish { "Español", // Spanish
@@ -4815,7 +4831,8 @@ static const char* const myLanguage[18][281] PROGMEM = {
"borrado", // 277 "borrado", // 277
"Prevenir doble PI", // 278 "Prevenir doble PI", // 278
"Rango", // 279 "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 "limpo", // 277
"Prevenir PI duplo", // 278 "Prevenir PI duplo", // 278
"Intervalo", // 279 "Intervalo", // 279
"Completo" // 280 "Completo", // 280
"Wait time on\nsignal only" // 281
} }
}; };
#endif #endif