diff --git a/web/main.js b/web/main.js index 8ca88dc..4721199 100644 --- a/web/main.js +++ b/web/main.js @@ -4,10 +4,6 @@ const sensorData = {}; let liveGraphs = []; let nodeArray = []; let nodeDict = {}; -let funny; -// letiables -let intervalDelay = 5000; -let amountOfNodes = 3; const socket = new WebSocket("ws://145.92.8.114/ws"); function openConnection() { @@ -188,14 +184,6 @@ function updateNodeData(node, temperature, humidity, eCO2, TVOC) { document.getElementById("TVOCStatus").textContent = "Connected"; // Update the graph - liveGraphs[node -1].updateData(temperature, humidity, eCO2, TVOC); + liveGraphs[node - 1].updateData(temperature, humidity, eCO2, TVOC); liveGraphs[node - 1].updateGraph(); - - console.log(nodeDict); - console.log(nodeArray); -} - -// make the graphs -liveGraphs.forEach((graph) => { - graph.makeGraph(); -}); \ No newline at end of file +} \ No newline at end of file