w4tsn / node-red-contrib-modbus-api

An API like node-red implementation of the modbus-serial package.
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Refactor modbus in #4

Open gemini86 opened 4 years ago

gemini86 commented 4 years ago

Are there any issues addressed by this pull-request?

What are you doing in this pull-request in general?

fixing linter issues and reducing CC of modbusIn node. Simplifying code to use same callbacks and handlers for read and write functions.

What are possible side-effect?

none that I could see.

Did you write tests and what are you testing?

existing units tests have been fixed (issue where client connection wasn't being closed properly) and pass tests. Tested with separate node-red instance running a client connection to read/write data.

gemini86 commented 4 years ago

Hopefully this resolves the remaining issues with the add_write PR which was already merged. Thanks for the opportunity to work with you on this. I think this node will be useful for so many people, and is very approachable.