Skip to content

Commit a530e85

Browse files
committed
refactor: change export to local function for convertSecondsToHHMM and add capacity variables
1 parent 3efb92f commit a530e85

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

nodejs-assets/nodejs-project/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@
773773
}
774774

775775

776-
export function convertSecondsToHHMM(totalSeconds) {
776+
function convertSecondsToHHMM(totalSeconds) {
777777
const hours = Math.floor(totalSeconds / 3600);
778778
const minutes = Math.floor((totalSeconds % 3600) / 60);
779779

@@ -830,9 +830,12 @@
830830
cellVolts: info.cellVolts,
831831
voltage: info.totalVolts,
832832
});
833+
const remainingCapacityAh = info.remainingCapacityAh;
834+
const current = info.current;
833835

834836
const charging = current > 0;
835837
const discharging = current < 0;
838+
const nominalCapacityAh = info.nominalCapacityAh;
836839

837840
let secondsRemaining;
838841

0 commit comments

Comments
 (0)