kochedykov / jlibmodbus

JLibModbus - is an implementation of the Modbus protocol v1.1b in java language. Java modbus library. It works. Welcome.
http://kochedykov.github.io/jlibmodbus/
Apache License 2.0
307 stars 128 forks source link

ModbusMaster use deprecated methods #69

Open leoandrea7 opened 3 years ago

leoandrea7 commented 3 years ago

Hi, I noticed that in ModbusMaster.java are used deprecated methods. Indeed inside readHoldingRegisters and readInputRegisters methods the return value is given by response.getRegisters() ​that is deprecated. Maybe the right return value should be response.getHoldingRegister(), in this way is possible to use convert methods of ModbusHoldingRegisters.class.

The same goes for readCoils and readDiscreteInputs methods. Thanks.