From b6a244f6a422399c20b06e253edfda676b854f10 Mon Sep 17 00:00:00 2001 From: IrisVega Date: Sat, 20 Jul 2024 17:21:22 +0800 Subject: [PATCH] modified: server.js modified: static/js/sensor-1.js --- server.js | 2 +- static/js/sensor-1.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 76cefc4..71ebde0 100644 --- a/server.js +++ b/server.js @@ -67,7 +67,7 @@ function getLatestSensorData(callback) { humidity: data.humidity, co2: data.co2, pressure: data.pressure, - timestamp: data.timestamp + timestamps: data.timestamps }); }); } diff --git a/static/js/sensor-1.js b/static/js/sensor-1.js index 4304bad..c1fc0cc 100644 --- a/static/js/sensor-1.js +++ b/static/js/sensor-1.js @@ -26,8 +26,8 @@ document.addEventListener('DOMContentLoaded', function () { } // 添加新的数据 - timestamps.push(data.timestamp); - temperatures.push(data.temperature); + timestamps.push(data.timestamps); + temperatures.push(data.temperatures); updateChart(); });