From 72306c4b95c725cada2cef1ebb799c034291ebda Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sun, 10 Sep 2023 21:19:48 +0200 Subject: [PATCH] Reduced I2C traffic while screen is muted (and XDRGTK is not in use) --- TEF6686_ESP32.ino | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 5cf7e3c..7b05ef5 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -778,7 +778,12 @@ void loop() { if (millis() >= lowsignaltimer + 300) { lowsignaltimer = millis(); - if (band < BAND_GAP) radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); else radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + if (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB))) { + if (band < BAND_GAP) + radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + else + radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + } if (screenmute) readRds(); if (!menu) { doSquelch(); @@ -787,7 +792,12 @@ void loop() { } } else { - if (band < BAND_GAP) radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); else radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + if (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB))) { + if (band < BAND_GAP) + radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + else + radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN); + } if (!menu) { doSquelch(); if (millis() >= tuningtimer + 200) readRds();