Fixed a problem when using FM scanner with cancel on correct PI

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-06-04 19:04:53 +02:00
parent f0477180b1
commit c3e3e235a0
+8 -3
View File
@@ -76,6 +76,7 @@ bool hasCTold;
bool haseonold;
bool hasrtplusold;
bool hastmcold;
bool initdxscan;
bool leave;
bool LowLevelInit;
bool memorystore;
@@ -846,6 +847,7 @@ void loop() {
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
}
scantimer = millis();
initdxscan = false;
}
if (millis() >= flashingtimer + 500) {
@@ -861,9 +863,11 @@ void loop() {
}
delay(50);
radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
switch (scancancel) {
case CORRECTPI: if (radio.rds.correctPI != 0) cancelDXScan(); break;
case SIGNAL: if ((USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80 && OStatus > -80)) cancelDXScan(); break;
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;
}
}
}
@@ -4480,6 +4484,7 @@ void endMenu() {
}
void startFMDXScan() {
initdxscan = true;
if (afscreen || advancedRDS) BuildDisplay();
if (memorypos > scanstop || memorypos < scanstart) memorypos = scanstart;