thiagoralves / OpenPLC_v3

OpenPLC Runtime version 3
GNU General Public License v3.0
1.08k stars 438 forks source link

Connection status issues resolved #156

Closed eriklagerwall closed 2 years ago

eriklagerwall commented 2 years ago

Hi. I fixed a issues with RTU devices. Using calloc instead of malloc makes shore that isConnected in MB_device is false on initialization. Also moved the part that handles multiple RTU devices to initializeMB so that modbus_new_rtu is called only once for every port making shore that port settings and connections status is handled consistent.

Fixes thiagoralves/OpenPLC_v3#150