modbus-serial
Advanced tools
Comparing version 3.6.9 to 3.7.0
{ | ||
"name": "modbus-serial", | ||
"version": "3.6.9", | ||
"version": "3.7.0", | ||
"description": "A pure JavaScript implemetation of MODBUS-RTU (and TCP) for NodeJS.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -77,3 +77,3 @@ 'use strict'; | ||
// replace the 1 byte lrc with a two byte crc16 | ||
bufDecoded.writeUInt16LE(crc16(bufDecoded), bufDecoded.length-2); | ||
bufDecoded.writeUInt16LE(crc16(bufDecoded.slice(0, -2)), bufDecoded.length-2); | ||
@@ -80,0 +80,0 @@ return bufDecoded; |
@@ -28,3 +28,3 @@ 'use strict'; | ||
(0x7f & buf[1]) == modbus._cmd && | ||
crcIn == crc16(buf)); | ||
crcIn == crc16(buf.slice(0, -2))); | ||
} | ||
@@ -31,0 +31,0 @@ |
@@ -26,3 +26,3 @@ 'use strict'; | ||
(0x7f & buf[1]) == modbus._cmd && | ||
crcIn == crc16(buf)); | ||
crcIn == crc16(buf.slice(0, -2))); | ||
} | ||
@@ -29,0 +29,0 @@ |
@@ -34,3 +34,3 @@ 'use strict'; | ||
data.copy(buffer, 0, 6); | ||
crc = crc16(buffer); | ||
crc = crc16(buffer.slice(0, -2)); | ||
buffer.writeUInt16LE(crc, buffer.length - 2); | ||
@@ -37,0 +37,0 @@ |
@@ -28,3 +28,3 @@ 'use strict'; | ||
(0x7f & buf[1]) == modbus._cmd && | ||
crcIn == crc16(buf)); | ||
crcIn == crc16(buf.slice(0, -2))); | ||
} | ||
@@ -31,0 +31,0 @@ |
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
86527