From d24bcd34977d2058146fb04ed0da5296ef989ccb Mon Sep 17 00:00:00 2001 From: IrisVega Date: Sat, 20 Jul 2024 20:43:12 +0800 Subject: [PATCH] modified: static/js/sensor-2.js modified: static/js/sensor-3.js modified: static/js/sensor-4.js --- static/js/sensor-2.js | 2 +- static/js/sensor-3.js | 2 +- static/js/sensor-4.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/sensor-2.js b/static/js/sensor-2.js index 3465126..1a8d931 100644 --- a/static/js/sensor-2.js +++ b/static/js/sensor-2.js @@ -100,7 +100,7 @@ document.addEventListener('DOMContentLoaded', function () { .then(response => response.json()) .then(data => { // 如果已有200个数据则移除最旧的一条 - if (timestamps.length >= 200) { + if (timestamps.length >= 50) { timestamps.shift(); humidities.shift(); } diff --git a/static/js/sensor-3.js b/static/js/sensor-3.js index 9635884..b32472c 100644 --- a/static/js/sensor-3.js +++ b/static/js/sensor-3.js @@ -101,7 +101,7 @@ document.addEventListener('DOMContentLoaded', function () { .then(response => response.json()) .then(data => { // 如果已有200个数据则移除最旧的一条 - if (timestamps.length >= 200) { + if (timestamps.length >= 50) { timestamps.shift(); co2.shift(); } diff --git a/static/js/sensor-4.js b/static/js/sensor-4.js index 30ffab2..91e0a8e 100644 --- a/static/js/sensor-4.js +++ b/static/js/sensor-4.js @@ -101,7 +101,7 @@ document.addEventListener('DOMContentLoaded', function () { .then(response => response.json()) .then(data => { // 如果已有200个数据则移除最旧的一条 - if (timestamps.length >= 200) { + if (timestamps.length >= 50) { timestamps.shift(); pressure.shift(); }