modbus-serial
Advanced tools
Comparing version 5.2.14 to 5.2.15
23
index.js
@@ -137,4 +137,4 @@ "use strict"; | ||
*/ | ||
function _writeBufferToPort(buffer) { | ||
var transaction = this._transactions[this._port._transactionIdWrite]; | ||
function _writeBufferToPort(buffer, transactionId) { | ||
var transaction = this._transactions[transactionId]; | ||
@@ -207,5 +207,2 @@ this._port.write(buffer); | ||
} else { | ||
/* On serial port open OK call next function */ | ||
if (callback) | ||
callback(error); | ||
@@ -326,2 +323,6 @@ /* init ports transaction id and counter */ | ||
}); | ||
/* On serial port open OK call next function with no error */ | ||
if (callback) | ||
callback(error); | ||
} | ||
@@ -406,3 +407,3 @@ }); | ||
// write buffer to serial port | ||
_writeBufferToPort.call(this, buf); | ||
_writeBufferToPort.call(this, buf, this._port._transactionIdWrite); | ||
}; | ||
@@ -460,3 +461,3 @@ | ||
// write buffer to serial port | ||
_writeBufferToPort.call(this, buf); | ||
_writeBufferToPort.call(this, buf, this._port._transactionIdWrite); | ||
}; | ||
@@ -506,3 +507,3 @@ | ||
// write buffer to serial port | ||
_writeBufferToPort.call(this, buf); | ||
_writeBufferToPort.call(this, buf, this._port._transactionIdWrite); | ||
}; | ||
@@ -548,3 +549,3 @@ | ||
// write buffer to serial port | ||
_writeBufferToPort.call(this, buf); | ||
_writeBufferToPort.call(this, buf, this._port._transactionIdWrite); | ||
}; | ||
@@ -605,3 +606,3 @@ | ||
// write buffer to serial port | ||
_writeBufferToPort.call(this, buf); | ||
_writeBufferToPort.call(this, buf, this._port._transactionIdWrite); | ||
}; | ||
@@ -651,3 +652,3 @@ | ||
// write buffer to serial port | ||
_writeBufferToPort.call(this, buf); | ||
_writeBufferToPort.call(this, buf, this._port._transactionIdWrite); | ||
}; | ||
@@ -654,0 +655,0 @@ |
{ | ||
"name": "modbus-serial", | ||
"version": "5.2.14", | ||
"version": "5.2.15", | ||
"description": "A pure JavaScript implemetation of MODBUS-RTU (Serial and TCP) for NodeJS.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177236