From 863f759f523f0694b83da6b17d5f1620afd22d19 Mon Sep 17 00:00:00 2001 From: Torsten Oltmanns Date: Fri, 25 Oct 2024 10:53:35 +0800 Subject: [PATCH] fixed charge/discharge state --- webserver/src/main/resources/static/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webserver/src/main/resources/static/index.html b/webserver/src/main/resources/static/index.html index 327a825e..41709001 100644 --- a/webserver/src/main/resources/static/index.html +++ b/webserver/src/main/resources/static/index.html @@ -84,9 +84,9 @@ averageVoltage += pack.packVoltage; if (pack.chargeDischargeStatus == 1) { - chargeState = 'Discharge'; - } else if (pack.chargeDischargeStatus == 2 && (chargeState === 'Idile' || chargeState === 'Sleep')) { chargeState = 'Charge'; + } else if (pack.chargeDischargeStatus == 2 && (chargeState === 'Idle' || chargeState === 'Sleep')) { + chargeState = 'Disharge'; } else if (pack.chargeDischargeStatus == 3 && chargeState === 'Idle') { chargeState = 'Sleep'; }