From e16ffedbdcf9623e306399c804408e1bdff781ea Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Thu, 12 Oct 2023 15:13:40 +0200 Subject: [PATCH] AF screen will now also refresh when Method B is detected --- TEF6686_ESP32.ino | 2 ++ src/rds.cpp | 3 ++- src/rds.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index f907ccb..6cc1f9b 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -46,6 +46,7 @@ TFT_eSPI tft = TFT_eSPI(240, 320); bool advancedRDS; bool af; +bool afmethodBold; bool afpage; bool afscreen; bool aftest; @@ -2266,6 +2267,7 @@ void ShowFreq(int mode) { rdsreset = true; licold = 254; ECCold = 253; + afmethodBold = false; if (wifi) { Udp.beginPacket(remoteip, 9030); diff --git a/src/rds.cpp b/src/rds.cpp index 80980d4..d0379be 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -832,7 +832,7 @@ void ShowAFEON() { afpagenr = 0; } - if (af_counterold != radio.af_counter) { + if (af_counterold != radio.af_counter || radio.afmethodB != afmethodBold) { tft.fillRect(2, 48, 166, 150, BackgroundColor); for (byte i = 0; i < radio.af_counter; i++) { byte x = i - (afpagenr == 2 ? 30 : 0); @@ -851,6 +851,7 @@ void ShowAFEON() { if (afpage && !screenmute) tftPrint(1, String(afpagenr) + "/2", 315, 222, SecondaryColor, SecondaryColorSmooth, 16); } af_counterold = radio.af_counter; + afmethodBold = radio.afmethodB; } if (radio.rds.hasEON) { diff --git a/src/rds.h b/src/rds.h index c382932..7dfe2b3 100644 --- a/src/rds.h +++ b/src/rds.h @@ -8,6 +8,7 @@ #include extern bool advancedRDS; +extern bool afmethodBold; extern bool afpage; extern bool afscreen; extern bool aftest;