From 61ab35481826d60f92e215923dd53b6d1cad2be0 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Wed, 30 Nov 2016 12:57:19 +0100 Subject: [PATCH] Change update procedure for power switch GUI --- web/htdocs/tools/pwr/pwr_switch.htm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/htdocs/tools/pwr/pwr_switch.htm b/web/htdocs/tools/pwr/pwr_switch.htm index 8ec0aea..df95d75 100644 --- a/web/htdocs/tools/pwr/pwr_switch.htm +++ b/web/htdocs/tools/pwr/pwr_switch.htm @@ -54,14 +54,14 @@ function maketable() { out += ""+i+""; if(typeof Vnames[i] !== 'undefined') out += Vnames[i]; if (Vstatus[i] == 1) { - out += ' '; + out += ' '; } else { - out += ' '; + out += ' '; } out += '\ '; - out += ''+Vcurrent[i]+''+Vaverage[i]+ + out += ''+Vcurrent[i]+''+Vaverage[i]+ ''+"\n"; } document.getElementById("display").innerHTML = out; @@ -124,7 +124,13 @@ function update(data) { Vaverage[i] = e.shift(); Vlimit[i] = e.shift(); } - maketable(); + document.getElementById("date").innerHTML = Vdate; + for(i=0;i