modified: server.js
modified: static/js/sensor-1.js
This commit is contained in:
parent
85fb76c5d1
commit
b6a244f6a4
@ -67,7 +67,7 @@ function getLatestSensorData(callback) {
|
|||||||
humidity: data.humidity,
|
humidity: data.humidity,
|
||||||
co2: data.co2,
|
co2: data.co2,
|
||||||
pressure: data.pressure,
|
pressure: data.pressure,
|
||||||
timestamp: data.timestamp
|
timestamps: data.timestamps
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 添加新的数据
|
// 添加新的数据
|
||||||
timestamps.push(data.timestamp);
|
timestamps.push(data.timestamps);
|
||||||
temperatures.push(data.temperature);
|
temperatures.push(data.temperatures);
|
||||||
|
|
||||||
updateChart();
|
updateChart();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user