Skip to content

Commit b235c16

Browse files
author
dingo35
committed
main.cpp: stop charging when Capacity limit is reached and timer is not set
1 parent 7ee5375 commit b235c16

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SmartEVSE-3/src/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,8 @@ void CalcBalancedCurrent(char mod) {
12841284
}
12851285

12861286
// check for HARD shortage of power
1287+
// with HARD shortage we stop charging
1288+
// with SOFT shortage we have a timer running
12871289
// IsetBalanced is already set to the minimum needed power to charge all Nodes
12881290
bool hardShortage = false;
12891291
// guard MaxMains
@@ -1294,6 +1296,8 @@ void CalcBalancedCurrent(char mod) {
12941296
if (((LoadBl == 0 && EVMeter.Type && Mode != MODE_NORMAL) || LoadBl == 1) // Conditions in which MaxCircuit has to be considered
12951297
&& (IsetBalanced > (MaxCircuit * 10) - Baseload_EV))
12961298
hardShortage = true;
1299+
if (!MaxSumMainsTime && LimitedByMaxSumMains) // if we don't use the Capacity timer, we want a hard stop
1300+
hardShortage = true;
12971301
if (hardShortage && Switching_To_Single_Phase != GOING_TO_SWITCH) { // because switching to single phase might solve the shortage
12981302
// ############ HARD shortage of power
12991303
NoCurrent++; // Flag NoCurrent left

0 commit comments

Comments
 (0)