When no AF is found in mem mode return to last frequency
This commit is contained in:
@@ -904,6 +904,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool foundmemaf = false;
|
||||||
for (int x = 8750; x <= 10800; x += 10) {
|
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;
|
if (rotary != 0 || digitalRead(BANDBUTTON) == LOW || digitalRead(MODEBUTTON) == LOW || digitalRead(BWBUTTON) == LOW || digitalRead(ROTARY_BUTTON) == LOW) break;
|
||||||
radio.SetFreq(x);
|
radio.SetFreq(x);
|
||||||
@@ -913,10 +914,16 @@ void loop() {
|
|||||||
}
|
}
|
||||||
if (radio.rds.correctPI == radio.getBlockA()) {
|
if (radio.rds.correctPI == radio.getBlockA()) {
|
||||||
frequency = x;
|
frequency = x;
|
||||||
|
foundmemaf = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!foundmemaf) {
|
||||||
|
frequency = freqold;
|
||||||
|
radio.SetFreq(frequency);
|
||||||
|
}
|
||||||
|
|
||||||
if (!screenmute) {
|
if (!screenmute) {
|
||||||
if (advancedRDS) {
|
if (advancedRDS) {
|
||||||
leave = true;
|
leave = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user