From c8ee099fcc9a7ee485e54395cc4c8766029098ee Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Thu, 26 May 2022 20:42:27 -0400 Subject: [PATCH] Reduce battery precision by on decimal place for everything so that it fits on one line --- main_view.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_view.html b/main_view.html index 726ddd9..583d9a9 100644 --- a/main_view.html +++ b/main_view.html @@ -340,8 +340,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(2).toString() + "%)"; - batCapacityFull.innerText = (7.7 * chargeFull / 1000000).toFixed(2).toString() + " Wh (" + (100 * chargeFull / chargeDesign).toFixed(2).toString() + "%)"; + batCapacityNow.innerText = (7.7 * chargeNow / 1000000).toFixed(1).toString() + " Wh (" + (100 * chargeNow / chargeFull).toFixed(1).toString() + "%)"; + batCapacityFull.innerText = (7.7 * chargeFull / 1000000).toFixed(1).toString() + " Wh (" + (100 * chargeFull / chargeDesign).toFixed(1).toString() + "%)"; } async function togglePersist() {