andresarmento / modbus-arduino

A library that allows your Arduino to communicate via Modbus protocol, acting as a slave (master in development). Supports serial (RS-232, RS-485) and IP via Ethernet (Modbus IP).
BSD 3-Clause "New" or "Revised" License
457 stars 268 forks source link

Shouldn't _len be 16 bits wide? #51

Open ansco11 opened 4 years ago

ansco11 commented 4 years ago

In Modbus.h _len is declared as byte, but in ModbusIP.cpp it is treated as a word:

_len = _MBAP[4] << 8 | _MBAP[5];