Skip to content

Commit 99e2145

Browse files
committed
ModbusEthernet: Fix server
1 parent 95cd3c0 commit 99e2145

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/ModbusAPI.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ uint16_t ModbusAPI<T>::write(TYPEID id, TAddress reg, bool value, cbTransaction
256256
return 0;
257257
}
258258
}
259+
template <class T>
260+
template <typename TYPEID>
259261
uint16_t ModbusAPI<T>::write(TYPEID id, TAddress reg, uint16_t* value, uint16_t numregs, cbTransaction cb, uint8_t unit) {
260262
switch (reg.type) {
261263
case TAddress::COIL:

src/ModbusEthernet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#undef MODBUS_ETH_WRAP_BEGIN
1616
#else
1717
#undef MODBUS_ETH_WRAP_ACCEPT
18-
#define MODBUS_ETH_WRAP_BEGIN
18+
#undef MODBUS_ETH_WRAP_BEGIN
1919
#endif
2020
// Ethernet class wrapper to be able to compile for ESP32
2121
class EthernetServerWrapper : public EthernetServer {

src/ModbusTCPTemplate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ void ModbusTCPTemplate<SERVER, CLIENT>::task() {
259259
Serial.print(n);
260260
Serial.print(": Bytes available ");
261261
Serial.println(tcpclient[n]->available());
262-
#endif
263262
#endif
264263
tcpclient[n]->readBytes(_MBAP.raw, sizeof(_MBAP.raw)); // Get MBAP
265264

0 commit comments

Comments
 (0)