Closed skefer closed 8 years ago
Thanks skefer for fix. But I would like to fix without pass the frame in function. I dont have much time now but I need to know why these functions dont work with global frame buffer.
Let's use writeMultipleRegisters for example. The global frame buffer were freed,on line 265 in Modbus.cpp. However, on line 282, we need write the frame data to Hreg.So we need a local variable to save those data before _frame freed. That's what i thought.
Tested the writMultipleRegisters and writeMultipleCoils function on my arduino mega2560 and pro mini, and found that they were uncorrect. So I fixed it.