Fix node event handling and live graph creation
This commit is contained in:
@@ -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,7 +62,8 @@ function nodeEventHandler(node) {
|
||||
if (!nodeArray.includes(node)) {
|
||||
nodeArray.push(node);
|
||||
nodeDict[node] = nodeArray.length;
|
||||
makeLiveGraph(nodeArray.length);
|
||||
|
||||
makeLiveGraph(nodeArray.length);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user