From a0428369ed25103026bcbfff1ee591eba6d0077d Mon Sep 17 00:00:00 2001 From: spaceAngel Date: Sun, 16 Oct 2022 14:40:55 +0200 Subject: [PATCH] About screen shows plugged when connected on power #feature --- src/UserInterface/Components/MainPanel/AboutPanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/UserInterface/Components/MainPanel/AboutPanel.cpp b/src/UserInterface/Components/MainPanel/AboutPanel.cpp index 129f71e..e1c644e 100644 --- a/src/UserInterface/Components/MainPanel/AboutPanel.cpp +++ b/src/UserInterface/Components/MainPanel/AboutPanel.cpp @@ -25,6 +25,12 @@ void AboutPanel::render() { TTGOClass::getWatch()->tft->drawString("Unpl:", 10, this->calculatePosY(3, true)); if (SystemInfo::getInstance()->getPluggedIn() == false) { this->renderDateDiff(SystemInfo::getInstance()->getUnplugTime(), 3); + } else { + TTGOClass::getWatch()->tft->drawString( + "plugged", + TTGOClass::getWatch()->tft->width() - TTGOClass::getWatch()->tft->textWidth("plugged") - 15, + this->calculatePosY(3, true) + ); } } this->prevUptime = uptime;