modified: server.js

modified:   static/js/sensor-1.js
This commit is contained in:
IrisVega 2024-07-20 17:21:22 +08:00
parent 85fb76c5d1
commit b6a244f6a4
2 changed files with 3 additions and 3 deletions

View File

@ -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
}); });
}); });
} }

View File

@ -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();
}); });