Browse Source

fix total in GUI

pull/736/head
lumapu 2 years ago
parent
commit
b8ed9b03d7
  1. 1
      src/platformio.ini
  2. 7
      src/web/html/visualization.html

1
src/platformio.ini

@ -57,6 +57,7 @@ monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
esp8266_exception_decoder, default
[env:esp8266-debug]
platform = espressif8266

7
src/web/html/visualization.html

@ -61,6 +61,10 @@
}
function totals() {
for(var i = 0; i < 5; i++) {
var total[i] = Math.round(total[i] * 100) / 100;
}
return ml("div", {class: "row mt-3 mb-5"},
ml("div", {class: "col"}, [
ml("div", {class: "p-2 total-h"},
@ -85,7 +89,7 @@
}
function ivHead(obj) {
total[0] += obj.ch[0][2]; // P_AC
total[1] += obj.ch[0][7]/1000; // YieldDay
total[1] += obj.ch[0][7]; // YieldDay
total[2] += obj.ch[0][6]; // YieldTotal
total[3] += obj.ch[0][8]; // P_DC
total[4] += obj.ch[0][10]; // Q_AC
@ -209,6 +213,7 @@
ivEn = Object.values(Object.assign({}, obj["iv"]));
mIvHtml = [];
mNum = 0;
total.fill(0);
for(var i = 0; i < obj.iv.length; i++) {
if(obj.iv[i])
getAjax("/api/inverter/id/" + i, parseIv);

Loading…
Cancel
Save