From c4fa9fbfa5ad0b12c6e4f101d150e149039984ed Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Fri, 29 Mar 2024 14:59:23 +0100 Subject: [PATCH] removed junk --- web/newWebsite/main.js | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/web/newWebsite/main.js b/web/newWebsite/main.js index 25fbf2f..a62e059 100644 --- a/web/newWebsite/main.js +++ b/web/newWebsite/main.js @@ -4,7 +4,7 @@ const sensorData = {}; let liveGraphs = []; let nodeArray = []; let nodeDict = {}; - +let graphArray = []; // letiables let intervalDelay = 5000; let amountOfNodes = 3; @@ -101,29 +101,6 @@ async function nodeAdressHandler(node, dataTypes) { } } -function createGauge(node, dataType) { - // Create a new gauge here - let gauge = new GaugeGroup(node, dataType); // Assuming Gauge is the name of the class - sensorData[node][dataType] = gauge; // Store the gauge in the sensorData object for later use -} - - -//function for making the html elements for the following html code -function nodeData(data) { - let nodeData = document.createElement("div"); - nodeData.innerHTML = data; - // nodeData.setAttribute("id", "node" + node); - document.body.appendChild(nodeData); - // console.log("Hello World"); -} - - -function updateGauge(nodeNumber, dataType, value) { - // Update the gauge here - let gauge = sensorData[nodeNumber][dataType]; // Get the gauge from the sensorData object - gauge.update(value); // Assuming the Gauge class has an update method - } - function getNodeInfo(node){ return fetch("http://145.92.8.114/getNodeInfo?macAdress=" + node) .then(response => { @@ -142,4 +119,5 @@ function getNodeInfo(node){ }; }) -} \ No newline at end of file +} +