From f2956e9d26229235e5c45da9609cc72d7dd438e5 Mon Sep 17 00:00:00 2001 From: pelgraine <140762863+pelgraine@users.noreply.github.com> Date: Tue, 17 Feb 2026 18:55:10 +1100 Subject: [PATCH] changed firmware version date; changed render battery indicator back to meshcore app display method --- examples/companion_radio/MyMesh.h | 2 +- examples/companion_radio/ui-new/UITask.cpp | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index c1b1cb3d..55e92a91 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -8,7 +8,7 @@ #define FIRMWARE_VER_CODE 8 #ifndef FIRMWARE_BUILD_DATE -#define FIRMWARE_BUILD_DATE "16 Feb 2026" +#define FIRMWARE_BUILD_DATE "17 Feb 2026" #endif #ifndef FIRMWARE_VERSION diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 48d59bcd..7f399aab 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -118,12 +118,8 @@ class HomeScreen : public UIScreen { void renderBatteryIndicator(DisplayDriver& display, uint16_t batteryMilliVolts, int* outIconX = nullptr) { + // Use voltage-based estimation to match BLE app readings uint8_t batteryPercentage = 0; -#if HAS_BQ27220 - // Use fuel gauge SOC directly — accurate across the full discharge curve - batteryPercentage = board.getBatteryPercent(); -#else - // Fallback: voltage-based linear estimation for boards without fuel gauge if (batteryMilliVolts > 0) { const int minMilliVolts = 3000; const int maxMilliVolts = 4200; @@ -132,7 +128,6 @@ void renderBatteryIndicator(DisplayDriver& display, uint16_t batteryMilliVolts, if (pct > 100) pct = 100; batteryPercentage = (uint8_t)pct; } -#endif display.setColor(DisplayDriver::GREEN); @@ -618,13 +613,6 @@ public: 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);