From 98a5120dfd586b604c3f0886958e78469af86616 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sun, 8 Oct 2023 19:19:43 +0200 Subject: [PATCH] When WiFi is active, a red outline was shown in the battery indicator --- TEF6686_ESP32.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index 016c5e4..a182767 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -2888,10 +2888,10 @@ void ShowBattery() { } uint16_t v = analogRead(BATTERY_PIN); - battery = map(constrain(v, BAT_LEVEL_EMPTY, BAT_LEVEL_FULL), BAT_LEVEL_EMPTY, BAT_LEVEL_FULL, 0, BAT_LEVEL_STAGE); + if (batteryold != battery) { - if (batterydetect) { + if (!wifi && batterydetect) { if (battery == 0) { tft.drawRoundRect(277, 6, 37, 20, 2, BarSignificantColor); tft.fillRoundRect(313, 13, 4, 6, 2, BarSignificantColor);