Add .## decimal to battery stats

This commit is contained in:
NGnius (Graham) 2022-05-22 17:49:19 -04:00
parent 9ec9a0cf40
commit eac9f95ed7

View file

@ -264,8 +264,8 @@
let chargeNow = await getChargeNow();
let chargeFull = await getChargeFull();
let chargeDesign = await getChargeDesign();
batCapacityNow.innerText = (7.7 * chargeNow / 1000000).toFixed(2).toString() + " Wh (" + (100 * chargeNow / chargeFull).toFixed(0).toString() + "%)";
batCapacityFull.innerText = (7.7 * chargeFull / 1000000).toFixed(2).toString() + " Wh (" + (100 * chargeFull / chargeDesign).toFixed(0).toString() + "%)";
batCapacityNow.innerText = (7.7 * chargeNow / 1000000).toFixed(2).toString() + " Wh (" + (100 * chargeNow / chargeFull).toFixed(2).toString() + "%)";
batCapacityFull.innerText = (7.7 * chargeFull / 1000000).toFixed(2).toString() + " Wh (" + (100 * chargeFull / chargeDesign).toFixed(2).toString() + "%)";
}
async function togglePersist() {