Skip to content

Commit

Permalink
fixed charge/discharge state
Browse files Browse the repository at this point in the history
  • Loading branch information
ai-republic committed Oct 25, 2024
1 parent 8eaa93e commit 863f759
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webserver/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 863f759

Please sign in to comment.