From 6e3e35ac6723ce45dddf72dc92999bd4f672a311 Mon Sep 17 00:00:00 2001 From: hacesoft <53556265+hacesoft@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:24:56 +0100 Subject: [PATCH] Update ModbusTCP.h when using NodeMCU 1.0 board. - ESP8266 and latest version of WiFiManager library: 2.0.17 the message is signaled: modbus-esp8266\src/ModbusTCP.h:21:26: warning: 'WiFiClient WiFiServer::available(uint8_t*)' is deprecated: Renamed to accept(). [-Wdeprecated-declarations] 21 | return available() after replacing with new method: return WiFiServer::accept(); there are no error messages and communication between NodeMCU and Node-Red works, I personally tried it. --- src/ModbusTCP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ModbusTCP.h b/src/ModbusTCP.h index fed76c3..ad0267a 100644 --- a/src/ModbusTCP.h +++ b/src/ModbusTCP.h @@ -18,7 +18,7 @@ class WiFiServerESPWrapper : public WiFiServer { public: WiFiServerESPWrapper(uint16_t port) : WiFiServer(port) {} inline WiFiClient accept() { - return available(); + return WiFiServer::accept(); } };