Skip to content

Commit

Permalink
index.html: Show nr of phases in charge_current line
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed Dec 22, 2022
1 parent 97acc3a commit 44c4383
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion SmartEVSE-3/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
$('#state').append(" (Stopping in " + data.evse.solar_stop_timer + "s)");
}

$('#charge_current').text((data.settings.charge_current/10).toFixed(1) + " A");
$('#current_min').text(data.settings.current_min.toFixed(1) + " A");
$('#current_max').text(data.settings.current_max.toFixed(1) + " A");
$('#override_current').text((data.settings.override_current/10).toFixed(1) + " A");
Expand All @@ -99,21 +98,31 @@
$('#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");
nr_of_phases_charging = 0;
if(data.phase_currents.charging_L1) {
$('#phase_1').append("*");
nr_of_phases_charging++;
} else {
$('#phase_1').append(" ");
}
if(data.phase_currents.charging_L2) {
$('#phase_2').append("*");
nr_of_phases_charging++;
} else {
$('#phase_2').append(" ");
}
if(data.phase_currents.charging_L3) {
$('#phase_3').append("*");
nr_of_phases_charging++;
} else {
$('#phase_3').append(" ");
}
if (nr_of_phases_charging != 0) {
$('#charge_current').text(nr_of_phases_charging + " x " + (data.settings.charge_current/10).toFixed(1) + " A");
}
else {
$('#charge_current').text((data.settings.charge_current/10).toFixed(1) + " A");
}

$('#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

0 comments on commit 44c4383

Please sign in to comment.