plcpeople / nodeS7

Node.JS library for communication to Siemens S7 PLCs
MIT License
358 stars 121 forks source link

Bit array length was overwriten #66

Closed luisbardalez closed 5 years ago

luisbardalez commented 5 years ago

When using a bit array (ex: "Q3.3.4") it is expected to have bitOffset=3 and arrayLength=4, but the next "if" condition with "datatype !== 'X'" was overwriting arrayLength to 1. The behaviour has been changed to work as expected using "if-else if-else".

plcpeople commented 5 years ago

Thank you for the PR. Sorry it took so long to integrate, I had meant to look this over and forgot until another PR was submitted.