From f5f43aa8aa4d1856817966d2ebdd268e5ab73467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Wennerstr=C3=B8m?= Date: Sun, 24 May 2026 09:48:35 +0200 Subject: [PATCH] fix(boards): Remove redundant AXP2101 charging configuration for Waveshare ESP32-C6-Touch-AMOLED-2.16 - These settings were causing conflicts with the on-chip fuel gauge reference configuration - Simplify power initialization by relying on BSP defaults instead of overriding them --- firmware/src/boards/waveshare_amoled_216_c6/power.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/firmware/src/boards/waveshare_amoled_216_c6/power.cpp b/firmware/src/boards/waveshare_amoled_216_c6/power.cpp index a7aa277..395ef05 100644 --- a/firmware/src/boards/waveshare_amoled_216_c6/power.cpp +++ b/firmware/src/boards/waveshare_amoled_216_c6/power.cpp @@ -33,10 +33,6 @@ void power_hal_init(void) { // Mirror the Waveshare XiaoZhi BSP charging config so the on-chip // fuel gauge has the right reference numbers. Without these, // getBatteryPercent() returns -1 / shows "---" on the UI. - pmu.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V1); - pmu.setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_400MA); - pmu.setChargerTerminationCurr(XPOWERS_AXP2101_CHG_ITERM_25MA); - pmu.setPrechargeCurr(XPOWERS_AXP2101_PRECHARGE_50MA); pmu.disableIRQ(XPOWERS_AXP2101_ALL_IRQ); pmu.clearIrqStatus(); @@ -48,7 +44,7 @@ void power_hal_init(void) { } void power_hal_tick(void) { - uint32_t now = millis(); + uint32_t now = millis(); if (now - last_charging_ms >= CHARGING_POLL_MS) { last_charging_ms = now;