modified: static/js/sensor-2.js

modified:   static/js/sensor-3.js
	modified:   static/js/sensor-4.js
This commit is contained in:
IrisVega 2024-07-20 20:43:12 +08:00
parent 4c4c9a74a7
commit d24bcd3497
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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