Skip to content

Commit

Permalink
index.html, evse.cpp: Print a little star behind the charging phases.
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed Dec 4, 2022
1 parent 15ff4d4 commit e253efa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 16 additions & 1 deletion SmartEVSE-3/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
let minCurrent=parseInt(data.settings.current_min.toFixed(1));
let maxCurrent=parseInt(data.settings.current_max.toFixed(1));

// Initialiaze at page load
// Initialize at page load
for(let x = minCurrent ; x <= maxCurrent ; x++) {
$('#mode_override_current').append($('<option>', {
value: x,
Expand Down Expand Up @@ -100,6 +100,21 @@
$('#phase_1').text((data.phase_currents.L1/10).toFixed(1) + " A");
$('#phase_2').text((data.phase_currents.L2/10).toFixed(1) + " A");
$('#phase_3').text((data.phase_currents.L3/10).toFixed(1) + " A");
if(data.phase_currents.charging_L1) {
$('#phase_1').append("*");
} else {
$('#phase_1').append(" ");
}
if(data.phase_currents.charging_L2) {
$('#phase_2').append("*");
} else {
$('#phase_2').append(" ");
}
if(data.phase_currents.charging_L3) {
$('#phase_3').append("*");
} else {
$('#phase_3').append(" ");
}

$('#phase_original_total').text((data.phase_currents.original_data.TOTAL/10).toFixed(1) + " A");
$('#phase_original_1').text((data.phase_currents.original_data.L1/10).toFixed(1) + " A");
Expand Down
3 changes: 3 additions & 0 deletions SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3142,6 +3142,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"]["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 e253efa

Please sign in to comment.