Fix node event handling and live graph creation

This commit is contained in:
sietse jonker
2024-03-14 15:05:38 +01:00
parent 94f118742e
commit 4fd8c3d958

View File

@@ -48,7 +48,7 @@ openConnection();
function handleIncomingData(data) {
nodeEventHandler(data.node);
funny = data.node;
nodeNumber = nodeDict[data.node];
temperature = data.Temp;
humidity = data.Humi;
@@ -62,6 +62,7 @@ function nodeEventHandler(node) {
if (!nodeArray.includes(node)) {
nodeArray.push(node);
nodeDict[node] = nodeArray.length;
makeLiveGraph(nodeArray.length);
}
}