node-zserial 1.0.12 → 1.0.13
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 +4 -1
package/package.json
CHANGED
package/zserial.js
CHANGED
|
@@ -379,6 +379,7 @@ module.exports = function (RED) {
|
|
|
379
379
|
if (isNaN(baud)) {
|
|
380
380
|
// node.error(RED._("serial.errors.badbaudrate"), msg);
|
|
381
381
|
zsend(null, {
|
|
382
|
+
...serialConfig,
|
|
382
383
|
text: RED._("serial.errors.badbaudrate")
|
|
383
384
|
}, null, curPort.serial.path, done)
|
|
384
385
|
} else {
|
|
@@ -386,7 +387,7 @@ module.exports = function (RED) {
|
|
|
386
387
|
if (err) {
|
|
387
388
|
// node.error(err);
|
|
388
389
|
zsend(null, {
|
|
389
|
-
|
|
390
|
+
...serialConfig,
|
|
390
391
|
status: "ERR_UPDATE",
|
|
391
392
|
error: err,
|
|
392
393
|
text: "更新波特率失败"
|
|
@@ -397,6 +398,7 @@ module.exports = function (RED) {
|
|
|
397
398
|
}
|
|
398
399
|
if (!serialConfig.hasOwnProperty("payload")) {
|
|
399
400
|
zsend(null, {
|
|
401
|
+
...serialConfig,
|
|
400
402
|
text: "No payload"
|
|
401
403
|
}, null, curPort.serial.path, done)
|
|
402
404
|
return;
|
|
@@ -426,6 +428,7 @@ module.exports = function (RED) {
|
|
|
426
428
|
} else {
|
|
427
429
|
curPort._retryNum = 0
|
|
428
430
|
zsend(null, {
|
|
431
|
+
...serialConfig,
|
|
429
432
|
status: "ERR_IN_QUEUE",
|
|
430
433
|
text: '串口未打开,加入消息队列失败',
|
|
431
434
|
port: curPort.serial.path
|