Skip to content

Commit

Permalink
main.cpp: in Solar mode, prevent switching off when StartCurrent woul…
Browse files Browse the repository at this point in the history
…d immediately restart Solar charging
  • Loading branch information
dingo35 committed Dec 6, 2024
1 parent 87e37c5 commit 94ca08e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SmartEVSE-3/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,10 @@ void CalcBalancedCurrent(char mod) {
IsetBalanced = ActiveEVSE * MinCurrent * 10; // retain old software behaviour: set minimal "MinCurrent" charge per active EVSE
if (Mode == MODE_SOLAR) {
// ----------- Check to see if we have to continue charging on solar power alone ----------
if (ActiveEVSE && StopTime && (IsumImport > 0)) {
// Importing too much?
if (ActiveEVSE && StopTime && IsumImport > 0 &&
// Would a stop free so much current that StartCurrent would immediately restart charging?
Isum > (ActiveEVSE * MinCurrent * Set_Nr_of_Phases_Charging() - StartCurrent) * 10) {
//TODO maybe enable solar switching for loadbl = 1
if (EnableC2 == AUTO && LoadBl == 0)
Set_Nr_of_Phases_Charging();
Expand Down

0 comments on commit 94ca08e

Please sign in to comment.