Skip to content

Commit

Permalink
evse.cpp: fix <waiting for solar> bug when enough power is available
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed Feb 2, 2024
1 parent 8015ef9 commit 31e2f3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,7 @@ char IsCurrentAvailable(void) {
// Charging will start after the timeout (chargedelay) period has ended
// Only when StartCurrent configured or Node MinCurrent detected or Node inactive
if (Mode == MODE_SOLAR) { // no active EVSE yet?
if (ActiveEVSE == 0 && Isum >= ((signed int)StartCurrent *-10)) return 0;
else if ((ActiveEVSE * MinCurrent * 10) > TotalCurrent) return 0; // check if we can split the available current between all active EVSE's
if (ActiveEVSE == 1 && Isum >= ((signed int)StartCurrent *-10)) return 0;
}

return 1;
Expand Down

0 comments on commit 31e2f3f

Please sign in to comment.