Small change in DX mode scan detector

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-04-14 20:27:02 +02:00
parent f5fe2b70e1
commit 300c875739

View File

@@ -803,6 +803,27 @@ void loop() {
if (digitalRead(BANDBUTTON) == LOW ) BANDBUTTONPress();
if (scandxmode) {
if (millis() >= scantimer + (scanhold * 1000)) {
if (scanmem) {
memorypos++;
if (memorypos > scanstop) memorypos = scanstart;
while (IsStationEmpty() || presets[memorypos].band != BAND_FM) {
memorypos++;
if (memorypos > scanstop) {
memorypos = scanstart;
break;
}
}
DoMemoryPosTune();
ShowMemoryPos();
} else {
TuneUp();
ShowFreq(0);
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
}
scantimer = millis();
}
if (millis() >= flashingtimer + 500) {
flashing = !flashing;
if (flashing) {
@@ -830,27 +851,6 @@ void loop() {
}
}
if (scandxmode && millis() >= scantimer + (scanhold * 1000)) {
if (scanmem) {
memorypos++;
if (memorypos > scanstop) memorypos = scanstart;
while (IsStationEmpty() || presets[memorypos].band != BAND_FM) {
memorypos++;
if (memorypos > scanstop) {
memorypos = scanstart;
break;
}
}
DoMemoryPosTune();
ShowMemoryPos();
} else {
TuneUp();
ShowFreq(0);
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
}
scantimer = millis();
}
if (millis() >= tuningtimer + 200) {
if (store) {
detachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A));