mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
fix: correct interval for fetching sensor data to every 5 seconds
This commit is contained in:
@@ -50,6 +50,9 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
sensorDataContainer.appendChild(row);
|
sensorDataContainer.appendChild(row);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setInterval(parseData, 1000);
|
||||||
|
|
||||||
// Update the image
|
// Update the image
|
||||||
function updateImage() {
|
function updateImage() {
|
||||||
var img = document.getElementById("robot-image");
|
var img = document.getElementById("robot-image");
|
||||||
@@ -57,7 +60,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch and display sensor data every 5 seconds
|
// Fetch and display sensor data every 5 seconds
|
||||||
setInterval(parseData, 1000);
|
|
||||||
|
|
||||||
// Update the image every 5 seconds
|
// Update the image every 5 seconds
|
||||||
setInterval(updateImage, 200);
|
setInterval(updateImage, 200);
|
||||||
|
Reference in New Issue
Block a user