modified: static/js/sensor-1.js

This commit is contained in:
IrisVega 2024-07-20 20:41:58 +08:00
parent 87f47bb595
commit 4c4c9a74a7
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', function () {
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
// 如果已有200个数据则移除最旧的一条 // 如果已有200个数据则移除最旧的一条
if (timestamps.length >= 200) { if (timestamps.length >= 50) {
timestamps.shift(); timestamps.shift();
temperatures.shift(); temperatures.shift();
} }