Bugfix: AF should not work when in menu or in afpage

This commit is contained in:
Sjef Verhoeven PE5PVB
2023-07-23 16:57:25 +02:00
parent 8c2cd6ae19
commit 5e089dc3a1
+3 -1
View File
@@ -623,6 +623,7 @@ void loop() {
if (power == true) { if (power == true) {
Communication(); Communication();
if (!menu && !afpage) {
if (band == BAND_FM && af && radio.rds.correctPI != 0) { if (band == BAND_FM && af && radio.rds.correctPI != 0) {
if ((aftest && millis() >= aftimer + 3000) || ((USN > 250 || WAM > 250) && millis() >= aftimer + 1000)) { if ((aftest && millis() >= aftimer + 3000) || ((USN > 250 || WAM > 250) && millis() >= aftimer + 1000)) {
aftimer = millis(); aftimer = millis();
@@ -647,6 +648,7 @@ void loop() {
} }
} }
} }
}
if (seek == true) Seek(direction); if (seek == true) Seek(direction);
@@ -4262,7 +4264,7 @@ void ShowFreq(int mode) {
Udp.beginPacket(remoteip, 9030); Udp.beginPacket(remoteip, 9030);
Udp.print("from=TEF tuner;freq="); Udp.print("from=TEF tuner;freq=");
if (band > BAND_GAP) Udp.print(String(frequency_AM) + "000;ClearRDS=1"); if (band > BAND_GAP) Udp.print(String(frequency_AM) + "000;ClearRDS=1");
else Udp.print(String(band == BAND_FM ? frequency: frequency_OIRT) + "0000;ClearRDS=1"); else Udp.print(String(band == BAND_FM ? frequency : frequency_OIRT) + "0000;ClearRDS=1");
Udp.endPacket(); Udp.endPacket();
} }
} }