From ea44570642dead4083ed5e52a1d8c620dd37ea85 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Thu, 2 Nov 2023 00:08:28 +0100 Subject: [PATCH] Fixed CT glitching --- TEF6686_ESP32.ino | 4 +--- src/rds.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index ec192f6..0a37264 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -2190,7 +2190,6 @@ void KeyUp() { if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM)); } if (!memorystore) { - if (radio.rds.hasCT) tftPrint(1, rds_clock, 205, 163, BackgroundColor, BackgroundColor, 16); radio.clearRDS(fullsearchrds); ShowFreq(0); store = true; @@ -2238,7 +2237,6 @@ void KeyDown() { if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM)); } if (!memorystore) { - if (radio.rds.hasCT) tftPrint(1, rds_clock, 205, 163, BackgroundColor, BackgroundColor, 16); radio.clearRDS(fullsearchrds); ShowFreq(0); store = true; @@ -2352,12 +2350,12 @@ void ShowFreq(int mode) { rtplusstringold = ""; eonstringold = ""; afstringold = ""; - rds_clockold = ""; rdsreset = true; licold = 254; ECCold = 253; afmethodBold = false; aid_counterold = 0; + dropout = false; if (wifi) { Udp.beginPacket(remoteip, 9030); diff --git a/src/rds.cpp b/src/rds.cpp index 20bbc46..b6a5d5b 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -303,9 +303,9 @@ void readRds() { } if (radio.rds.hasCT) { if (advancedRDS) { - tftReplace(1, rds_clockold, rds_clock, 205, 109, SecondaryColor, SecondaryColorSmooth, 16); + tftPrint(1, rds_clockold, 205, 109, SecondaryColor, SecondaryColorSmooth, 16); } else { - tftReplace(1, rds_clockold, rds_clock, 205, 163, SecondaryColor, SecondaryColorSmooth, 16); + tftPrint(1, rds_clockold, 205, 163, SecondaryColor, SecondaryColorSmooth, 16); } } dropout = true; @@ -333,9 +333,9 @@ void readRds() { } if (radio.rds.hasCT) { if (advancedRDS) { - tftReplace(1, rds_clockold, rds_clock, 205, 109, PrimaryColor, PrimaryColorSmooth, 16); + tftPrint(1, rds_clockold, 205, 109, PrimaryColor, PrimaryColorSmooth, 16); } else { - tftReplace(1, rds_clockold, rds_clock, 205, 163, PrimaryColor, PrimaryColorSmooth, 16); + tftPrint(1, rds_clockold, 205, 163, PrimaryColor, PrimaryColorSmooth, 16); } } dropout = false;