When using Node 10, the expected CRC value in the test case itself also did not match the actual value.
I also changed the value to be able to detect byte swaps.
Since there are some minor fixes in 3.0.1 regarding rtu i'll gonna setup a RTU test environment in my office and see that 3.0.1 can be released. Again thanks for you work.
When using Node 10, the expected CRC value in the test case itself also did not match the actual value. I also changed the value to be able to detect byte swaps.
This wasn't caught before because:
Buffer.prototype.readUInt16BE
returns0
whenNaN
is passed. See https://github.com/Cloud-Automation/node-modbus/issues/199#issuecomment-401561941. This is fixed in later versions of Node (I was using Node 10), but in Travis, only up to 8 is being tested.NaN
was passed when using Node 8.