emelianov / modbus-esp8266

Most complete Modbus library for Arduino. A library that allows your Arduino board to communicate via Modbus protocol, acting as a master, slave or both. Supports network transport (Modbus TCP) and Serial line/RS-485 (Modbus RTU). Supports Modbus TCP Security for ESP8266/ESP32.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jfbuggen opened this issue · comments

commented

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.