Skip to content

Commit 07c3b9d

Browse files
committed
Add balance status icon
1 parent faf6ac4 commit 07c3b9d

1 file changed

Lines changed: 19 additions & 24 deletions

File tree

nodejs-assets/nodejs-project/index.html

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -609,32 +609,24 @@
609609
${balanceStatus
610610
.map((v, i) => {
611611
const id = `cells-volt-bal-${i}`;
612-
if (!v) {
613-
delete estimateBalanceCells[i];
614-
}
615-
let bde;
616-
if (v) {
617-
bde =
618-
estimateBalanceCells[i] ||
619-
new BatteryDischargeEstimator(
620-
cellVolts[i],
621-
cellVolts[indicesOfLow[0]],
622-
);
623-
bde.recordVoltage(cellVolts[i]);
624-
estimateBalanceCells[i] = bde;
625-
}
626-
const remainingBalTime = bde?.estimateRemainingTime();
612+
// if (!v) {
613+
// delete estimateBalanceCells[i];
614+
// }
615+
// let bde;
616+
// if (v) {
617+
// bde =
618+
// estimateBalanceCells[i] ||
619+
// new BatteryDischargeEstimator(
620+
// cellVolts[i],
621+
// cellVolts[indicesOfLow[0]],
622+
// );
623+
// bde.recordVoltage(cellVolts[i]);
624+
// estimateBalanceCells[i] = bde;
625+
// }
626+
// const remainingBalTime = bde?.estimateRemainingTime();
627627
628628
let existingEl = document.getElementById(id);
629-
const text = `${
630-
v
631-
? `(Bal${
632-
remainingBalTime
633-
? ' Est ' + remainingBalTime.toFixed(2) + 'h'
634-
: ''
635-
}) `
636-
: ' '
637-
}${cellVolts[i].toFixed(3)}V`;
629+
const text = `${cellVolts[i].toFixed(3)}V`;
638630
639631
if (existingEl) {
640632
const newNum = cellVolts[i];
@@ -681,6 +673,9 @@
681673
682674
return off;
683675
})()}
676+
<span title="Balance Status" style="${
677+
!v ? 'filter: grayscale(100%);' : ''
678+
}">⚖️</span>
684679
</span>
685680
686681

0 commit comments

Comments
 (0)