Citation :
setInterval(function ( ) {
var xhttpstate = $.get ({
url : '/state',
type : 'GET',
dataType: "text",
success: function ( result ) { var config = result.split(";" );
dataGaugePA.setValue(0, 0, config[0]); dataGaugePA.setValue(0, 1, config[1]);
dataGaugePApower.setValue(0, 0, "Power" ); dataGaugePApower.setValue(0, 1, config[2]);
dataGaugePAtemp.setValue(0, 0, "Temp °C" ); dataGaugePAtemp.setValue(0, 1, config[3]);
dataGaugePowerCE.setValue(0, 0, "Puis. CE" ); dataGaugePowerCE.setValue(0, 1, config[4]);
gaugePA.draw(dataGaugePA,optionsGauge);
gaugePApower.draw(dataGaugePApower,optionsGaugepower);
gaugePAtemp.draw(dataGaugePAtemp,optionsGaugetemp);
gaugePowerCE.draw(dataGaugePowerCE,optionsGaugePowerCE);
document.getElementById("state" ).innerHTML = config[0];
document.getElementById("sigma" ).innerHTML = config[1];
document.getElementById("vers" ).innerHTML = config[5];
document.getElementById("vers2" ).innerHTML = config[5];
document.getElementById("indexEauVille" ).innerHTML = config[6];
document.getElementById("indexEauBuanderie" ).innerHTML = config[7];
},
async: true });
}, 2000 ) ;
|