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;