Remove unused code and update graph in updateNodeData function
This commit is contained in:
12
web/main.js
12
web/main.js
@@ -4,10 +4,6 @@ const sensorData = {};
|
|||||||
let liveGraphs = [];
|
let liveGraphs = [];
|
||||||
let nodeArray = [];
|
let nodeArray = [];
|
||||||
let nodeDict = {};
|
let nodeDict = {};
|
||||||
let funny;
|
|
||||||
// letiables
|
|
||||||
let intervalDelay = 5000;
|
|
||||||
let amountOfNodes = 3;
|
|
||||||
|
|
||||||
const socket = new WebSocket("ws://145.92.8.114/ws");
|
const socket = new WebSocket("ws://145.92.8.114/ws");
|
||||||
function openConnection() {
|
function openConnection() {
|
||||||
@@ -190,12 +186,4 @@ function updateNodeData(node, temperature, humidity, eCO2, TVOC) {
|
|||||||
// Update the graph
|
// Update the graph
|
||||||
liveGraphs[node - 1].updateData(temperature, humidity, eCO2, TVOC);
|
liveGraphs[node - 1].updateData(temperature, humidity, eCO2, TVOC);
|
||||||
liveGraphs[node - 1].updateGraph();
|
liveGraphs[node - 1].updateGraph();
|
||||||
|
|
||||||
console.log(nodeDict);
|
|
||||||
console.log(nodeArray);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// make the graphs
|
|
||||||
liveGraphs.forEach((graph) => {
|
|
||||||
graph.makeGraph();
|
|
||||||
});
|
|
Reference in New Issue
Block a user