From 27bc833110fad589cfedb06d729acc473f19a3a8 Mon Sep 17 00:00:00 2001 From: Yoonseok Hur Date: Wed, 22 Nov 2023 20:16:20 +0900 Subject: [PATCH] exposable serialConfig --- io/serialport/25-serial.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/io/serialport/25-serial.js b/io/serialport/25-serial.js index f112fd9f..66703c76 100644 --- a/io/serialport/25-serial.js +++ b/io/serialport/25-serial.js @@ -256,7 +256,12 @@ module.exports = function(RED) { }); } } - node.send({payload: node.serialConfig}); + let currentConfig = {}; + configProps.map((p) => { + currentConfig[p] = node.serialConfig[p]; + }); + currentConfig.enable = node.serialConfig.enable; + node.send({payload: currentConfig}); }); } RED.nodes.registerType("serial control", PortSelectNode);