node-zserial 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/zserial.js +6 -2
package/package.json
CHANGED
package/zserial.js
CHANGED
|
@@ -328,13 +328,17 @@ module.exports = function (RED) {
|
|
|
328
328
|
node.send([node._msg, null, null]);
|
|
329
329
|
}
|
|
330
330
|
if (err) {
|
|
331
|
+
if (err.payload) {
|
|
332
|
+
err.sendPayload = err.payload;
|
|
333
|
+
err.payload = ''
|
|
334
|
+
}
|
|
331
335
|
node.errorMsg[port] = err
|
|
332
336
|
node.send([null, node._msg, null]);
|
|
333
337
|
}
|
|
334
338
|
sendAll(done);
|
|
335
339
|
}
|
|
336
340
|
function onMsg(msg, send, done) {
|
|
337
|
-
|
|
341
|
+
|
|
338
342
|
initMsg(msg);
|
|
339
343
|
if (!msg.serialConfigs) {
|
|
340
344
|
node.error("需要配置批量配置:msg.serialConfigs");
|
|
@@ -462,7 +466,7 @@ module.exports = function (RED) {
|
|
|
462
466
|
msgout.status = "ERR_TIMEOUT";
|
|
463
467
|
msgout.port = curPort.serial.path;
|
|
464
468
|
node.status({ fill: "red", shape: "ring", text: "timeout:::" + curPort.serial.path });
|
|
465
|
-
zsend(null,msgout, null, curPort.serial.path, done);
|
|
469
|
+
zsend(null, msgout, null, curPort.serial.path, done);
|
|
466
470
|
});
|
|
467
471
|
|
|
468
472
|
curPort.on('initerror', function (port, retryNum, olderr) {
|