mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 20:35:00 +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);
|
||||
});
|
||||
}
|
||||
|
||||
setInterval(parseData, 1000);
|
||||
|
||||
// Update the image
|
||||
function updateImage() {
|
||||
var img = document.getElementById("robot-image");
|
||||
@@ -57,7 +60,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
}
|
||||
|
||||
// Fetch and display sensor data every 5 seconds
|
||||
setInterval(parseData, 1000);
|
||||
|
||||
// Update the image every 5 seconds
|
||||
setInterval(updateImage, 200);
|
||||
|
Reference in New Issue
Block a user