Fix DX scan cancel on signal

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-04-17 13:26:01 +02:00
parent a854966f19
commit 8bbaff0351

View File

@@ -820,16 +820,17 @@ void loop() {
if (flashing) { if (flashing) {
tft.drawRoundRect(1, 79, 42, 20, 5, ActiveColor); tft.drawRoundRect(1, 79, 42, 20, 5, ActiveColor);
tftPrint(0, "MEM", 22, 82, ActiveColor, ActiveColorSmooth, 16); tftPrint(0, "MEM", 22, 82, ActiveColor, ActiveColorSmooth, 16);
} else {
tft.drawRoundRect(1, 79, 42, 20, 5, GreyoutColor); tft.drawRoundRect(1, 79, 42, 20, 5, GreyoutColor);
tftPrint(0, "MEM", 22, 82, GreyoutColor, BackgroundColor, 16); tftPrint(0, "MEM", 22, 82, GreyoutColor, BackgroundColor, 16);
} }
flashingtimer = millis(); flashingtimer = millis();
} }
delay(50);
radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
switch (scancancel) { switch (scancancel) {
case CORRECTPI: if (radio.rds.correctPI != 0) cancelDXScan(); break; case CORRECTPI: if (radio.rds.correctPI != 0) cancelDXScan(); break;
case SIGNAL: if (USN < 250 && WAM < 250 && OStatus > -250 && OStatus < 250) cancelDXScan(); break; case SIGNAL: if ((USN < fmscansens * 30) && (WAM < 230) && (OStatus < 80 && OStatus > -80)) cancelDXScan(); break;
} }
} }