From 26634f28ec4dc930b7af67d43a215c54a0d98d53 Mon Sep 17 00:00:00 2001 From: MCelliotG Date: Mon, 25 Sep 2023 01:18:35 +0300 Subject: [PATCH] Fix battery bar indicator, added rounded edges --- TEF6686_ESP32.ino | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index ce3b665..ee6c457 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -2846,18 +2846,18 @@ void ShowBattery() { if (batteryold != battery) { if (batterydetect) { if (battery == 0) { - tft.drawRect(277, 6, 37, 20, BarSignificantColor); - tft.fillRect(313, 13, 4, 6, BarSignificantColor); + tft.drawRoundRect(277, 6, 37, 20, 2, BarSignificantColor); + tft.fillRoundRect(313, 13, 4, 6, 2, BarSignificantColor); } else { - tft.drawRect(277, 6, 37, 20, ActiveColor); - tft.fillRect(313, 13, 4, 6, ActiveColor); + tft.drawRoundRect(277, 6, 37, 20, 2, ActiveColor); + tft.fillRoundRect(313, 13, 4, 6, 2, ActiveColor); } - tft.fillRect(279, 8, 33, 16, BackgroundColor); - if (batteryoptions != BATTERY_VALUE && batteryoptions != BATTERY_PERCENT) tft.fillRect(279, 8, 17 + (battery * 4), 16, BarInsignificantColor); + tft.fillRoundRect(279, 8, 33, 16, 2, BackgroundColor); + if (batteryoptions != BATTERY_VALUE && batteryoptions != BATTERY_PERCENT) tft.fillRoundRect(279, 8, (battery * 8) , 16, 2, BarInsignificantColor); } else { - tft.drawRect(277, 6, 37, 20, GreyoutColor); - tft.fillRect(313, 13, 4, 6, GreyoutColor); - tft.fillRect(279, 8, 33, 16, BackgroundColor); + tft.drawRoundRect(277, 6, 37, 20, 2, GreyoutColor); + tft.fillRoundRect(313, 13, 4, 6, 2, GreyoutColor); + tft.fillRoundRect(279, 8, 33, 16, 2, BackgroundColor); } batteryold = battery; batteryVold = 0;