Skip to content

Commit

Permalink
evse.cpp: set charging phases booleans to false in the API when not c…
Browse files Browse the repository at this point in the history
…harging, because it confuses users
  • Loading branch information
dingo35 committed Jun 27, 2023
1 parent ce6a311 commit 14abe7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3280,9 +3280,9 @@ void StartwebServer(void) {
doc["phase_currents"]["L2"] = Irms[1];
doc["phase_currents"]["L3"] = Irms[2];
doc["phase_currents"]["last_data_update"] = phasesLastUpdate;
doc["phase_currents"]["charging_L1"] = Charging_Phase[0];
doc["phase_currents"]["charging_L2"] = Charging_Phase[1];
doc["phase_currents"]["charging_L3"] = Charging_Phase[2];
doc["phase_currents"]["charging_L1"] = (evstate == "Charging" ? Charging_Phase[0] : false);
doc["phase_currents"]["charging_L2"] = (evstate == "Charging" ? Charging_Phase[1] : false);
doc["phase_currents"]["charging_L3"] = (evstate == "Charging" ? Charging_Phase[2] : false);
doc["phase_currents"]["original_data"]["TOTAL"] = IrmsOriginal[0] + IrmsOriginal[1] + IrmsOriginal[2];
doc["phase_currents"]["original_data"]["L1"] = IrmsOriginal[0];
doc["phase_currents"]["original_data"]["L2"] = IrmsOriginal[1];
Expand Down

0 comments on commit 14abe7c

Please sign in to comment.