modified: static/js/sensor-2.js
modified: static/js/sensor-3.js modified: static/js/sensor-4.js
This commit is contained in:
parent
4c4c9a74a7
commit
d24bcd3497
@ -100,7 +100,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();
|
||||||
humidities.shift();
|
humidities.shift();
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,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();
|
||||||
co2.shift();
|
co2.shift();
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,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();
|
||||||
pressure.shift();
|
pressure.shift();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user