From 8dad7ae38bfca0e9b8ef00c224e50f97d8f5cb45 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 29 Sep 2025 14:50:51 -0600 Subject: [PATCH] take out the suffix from the chip until we actually have a way of knowing if the bettery is actually charging --- src/pbHelpers/Power.tsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pbHelpers/Power.tsx b/src/pbHelpers/Power.tsx index 2b28944..b98a842 100644 --- a/src/pbHelpers/Power.tsx +++ b/src/pbHelpers/Power.tsx @@ -71,17 +71,19 @@ export function describePower(power?: pond.DevicePower | null): PowerDescriber { } } else { let thresholds = notChargingThresholds; - let suffix = "not charging"; - //Ashton tells me that with the new battery that any voltage over 2.8 is charging and it maxes out at 4.2 volts, so dropping it down here as the chip would say not charging when it really was - if (power.inputVoltage >= 2.8) { - thresholds = chargingThresholds; - if (power.chargePercent === 100) { - suffix = "charged"; - } else { - suffix = "charging"; - } - } - result.description = power.chargePercent.toString() + "%, " + suffix; + // we would not actually know if it is charging here since it is just looking at the voltage now and not comparing to previous voltage + // let suffix = "not charging"; + // if (power.inputVoltage >= 4) { + // thresholds = chargingThresholds; + // if (power.chargePercent === 100) { + // suffix = "charged"; + // } else { + // suffix = "charging"; + // } + // } + // result.description = power.chargePercent.toString() + "%, " + suffix; + // TODO: there is a plan in place to add a boolean value to power in the backend to have it check and set the boolean, we can then use that to know if it is charging or not + result.description = power.chargePercent.toString() + "%" for (let i = 0; i < thresholds.length; i++) { if (power.chargePercent >= thresholds[i].threshold) { result.icon = thresholds[i].icon;