From 878f511d0e4f29b5cd7c952348eb032f464c43df Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 3 Dec 2019 21:38:33 +0000 Subject: [PATCH] Stop arduino nodes warning about MaxEmitters when more than 10 nodes in use --- hardware/Arduino/35-arduino.js | 2 ++ hardware/Arduino/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hardware/Arduino/35-arduino.js b/hardware/Arduino/35-arduino.js index 5e6302bd..8464312e 100644 --- a/hardware/Arduino/35-arduino.js +++ b/hardware/Arduino/35-arduino.js @@ -72,6 +72,7 @@ module.exports = function(RED) { if (typeof this.serverConfig === "object") { var startup = function() { node.board = node.serverConfig.board; + node.board.setMaxListeners(0); node.oldval = ""; node.status({fill:"grey",shape:"ring",text:"node-red:common.status.connecting"}); var doit = function() { @@ -146,6 +147,7 @@ module.exports = function(RED) { if (typeof node.serverConfig === "object") { var startup = function() { node.board = node.serverConfig.board; + node.board.setMaxListeners(0); node.status({fill:"grey",shape:"ring",text:"node-red:common.status.connecting"}); var doit = function() { node.running = true; diff --git a/hardware/Arduino/package.json b/hardware/Arduino/package.json index 45ab3bb0..b1c8e059 100644 --- a/hardware/Arduino/package.json +++ b/hardware/Arduino/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-arduino", - "version" : "0.3.0", + "version" : "0.3.1", "description" : "A Node-RED node to talk to an Arduino running firmata", "dependencies" : { "firmata" : "^2.0.0"