Added Math.round to input values

This commit is contained in:
Luis Aleixo 2022-06-27 16:13:08 +01:00
parent b455fdee14
commit 67a47dfd74

View file

@ -272,8 +272,8 @@ function on_wearing_mask_change() {
}
function populate_temp_hum_values(data, index) {
$("#sensor_temperature").text(data[index].Details.T + '°C');
$("#sensor_humidity").text(data[index].Details.RH + '%');
$("#sensor_temperature").text(Math.round(data[index].Details.T) + '°C');
$("#sensor_humidity").text(Math.round(data[index].Details.RH) + '%');
$("[name='inside_temp']").val(data[index].Details.T + 273.15);
$("[name='humidity']").val(data[index].Details.RH/100);
};