modbus-esp8266 icon indicating copy to clipboard operation
modbus-esp8266 copied to clipboard

Modbus::onSet in modbus.cpp (line 597) calls removeOnGet instead of removeOnSet

Open jfbuggen opened this issue 2 years ago • 0 comments

I'm just discovering this great library and was reading the code to better understand how it works.

I see the onGet and onSet are used to register callbacks, but if the cb is null, it actually removes the callback. However both call removeOnGet, calling removeon with a callback type TCallback::ON_GET. As a result, I guess the onSet will never be able to remove a onSet callback in that way.

Probably unnoticed since this is not much used.

jfbuggen avatar Sep 26 '23 11:09 jfbuggen