From 9809f47d292ba7c58eae37e78f241e9f4a83588a Mon Sep 17 00:00:00 2001 From: pelgraine <140762863+pelgraine@users.noreply.github.com> Date: Sun, 15 Feb 2026 09:19:43 +1100 Subject: [PATCH] battery charge estimated runtime fix - 2 to 3 charge discharge cycles needed for full calibration to 1400mah --- examples/companion_radio/ui-new/UITask.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 39d19df7..69d4e4cd 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -606,6 +606,20 @@ public: display.drawTextLeftAlign(0, y, "voltage"); sprintf(buf, "%d.%03d V", mv / 1000, mv % 1000); display.drawTextRightAlign(display.width()-1, y, buf); + y += 10; + + // Remaining capacity + uint16_t remCap = board.getRemainingCapacity(); + display.drawTextLeftAlign(0, y, "remaining cap"); + sprintf(buf, "%d mAh", remCap); + display.drawTextRightAlign(display.width()-1, y, buf); + y += 10; + + // Full charge capacity (learned value) + uint16_t fullCap = board.getFullChargeCapacity(); + display.drawTextLeftAlign(0, y, "full charge cap"); + sprintf(buf, "%d mAh", fullCap); + display.drawTextRightAlign(display.width()-1, y, buf); #endif } else if (_page == HomePage::SHUTDOWN) { display.setColor(DisplayDriver::GREEN);