Skip to content

Commit

Permalink
evse.cpp: Disable phase detection when only MainsMeter is connected, …
Browse files Browse the repository at this point in the history
…since it has proven to be unreliable
  • Loading branch information
dingo35 committed Dec 19, 2023
1 parent f9e2de8 commit 8a1638e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,15 +774,6 @@ void setState(uint8_t NewState) {
}
Detecting_Charging_Phases_Timer = PHASE_DETECTION_TIME; // we need time for the EV to decide to start charging
}
else if (MainsMeter) { // or else MainsMeter will do
OverrideCurrent_save = OverrideCurrent;
OverrideCurrent = MinCurrent * 10; // for detection of phases we are going to lock the charging current to MinCurrent
for (i=0; i<3; i++) {
Old_Irms[i] = Irms[i];
_LOG_D("Trying to detect Charging Phases START Irms[%i]=%.1f A.\n", i, (float)Irms[i]/10);
}
Detecting_Charging_Phases_Timer = PHASE_DETECTION_TIME; // we need time for the EV to decide to start charging
}
}
else //we are loadbalancing:
for (i=0; i<3; i++)
Expand Down Expand Up @@ -2837,10 +2828,6 @@ void Timer1S(void * parameter) {
Charging_Prob[i] = 10 * (abs(Irms_EV[i] - Old_Irms[i])) / MinCurrent; //100% means this phase is charging, 0% mwans not charging
_LOG_D("Trying to detect Charging Phases END Irms_EV[%i]=%.1f A.\n", i, (float)Irms_EV[i]/10);
} //TODO only working in Smart Mode //TODO we start charging with ChargeCurrent but in Smart mode this changes to Balanced[0]; how about Solar? generates error 32?
else if (MainsMeter) {
Charging_Prob[i] = 10 * (abs(Irms[i] - Old_Irms[i])) / MinCurrent; //100% means this phase is charging, 0% mwans not charging
_LOG_D("Trying to detect Charging Phases END Irms_[%i]=%.1f A.\n", i, (float)Irms[i]/10);
}
else
Charging_Prob[i] = 0;
Max_Charging_Prob = max(Charging_Prob[i], Max_Charging_Prob);
Expand Down

0 comments on commit 8a1638e

Please sign in to comment.