When no AF is found in mem mode return to last frequency

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-07-02 14:46:53 +02:00
parent 4b1c2ceed9
commit 298488c0dc

View File

@@ -904,6 +904,7 @@ void loop() {
}
}
bool foundmemaf = false;
for (int x = 8750; x <= 10800; x += 10) {
if (rotary != 0 || digitalRead(BANDBUTTON) == LOW || digitalRead(MODEBUTTON) == LOW || digitalRead(BWBUTTON) == LOW || digitalRead(ROTARY_BUTTON) == LOW) break;
radio.SetFreq(x);
@@ -913,10 +914,16 @@ void loop() {
}
if (radio.rds.correctPI == radio.getBlockA()) {
frequency = x;
foundmemaf = true;
break;
}
}
if (!foundmemaf) {
frequency = freqold;
radio.SetFreq(frequency);
}
if (!screenmute) {
if (advancedRDS) {
leave = true;