diff --git a/lib/TasmotaModbus-1.1.0/README.md b/lib/TasmotaModbus-1.1.1/README.md similarity index 100% rename from lib/TasmotaModbus-1.1.0/README.md rename to lib/TasmotaModbus-1.1.1/README.md diff --git a/lib/TasmotaModbus-1.1.0/examples/modbustest/modbustest.ino b/lib/TasmotaModbus-1.1.1/examples/modbustest/modbustest.ino similarity index 100% rename from lib/TasmotaModbus-1.1.0/examples/modbustest/modbustest.ino rename to lib/TasmotaModbus-1.1.1/examples/modbustest/modbustest.ino diff --git a/lib/TasmotaModbus-1.1.0/keywords.txt b/lib/TasmotaModbus-1.1.1/keywords.txt similarity index 100% rename from lib/TasmotaModbus-1.1.0/keywords.txt rename to lib/TasmotaModbus-1.1.1/keywords.txt diff --git a/lib/TasmotaModbus-1.1.0/library.json b/lib/TasmotaModbus-1.1.1/library.json similarity index 93% rename from lib/TasmotaModbus-1.1.0/library.json rename to lib/TasmotaModbus-1.1.1/library.json index d983bec32..75066a512 100644 --- a/lib/TasmotaModbus-1.1.0/library.json +++ b/lib/TasmotaModbus-1.1.1/library.json @@ -1,6 +1,6 @@ { "name": "TasmotaModbus", - "version": "1.1.0", + "version": "1.1.1", "keywords": [ "serial", "io", "TasmotaModbus" ], diff --git a/lib/TasmotaModbus-1.1.0/library.properties b/lib/TasmotaModbus-1.1.1/library.properties similarity index 93% rename from lib/TasmotaModbus-1.1.0/library.properties rename to lib/TasmotaModbus-1.1.1/library.properties index bb42fb372..709a71106 100644 --- a/lib/TasmotaModbus-1.1.0/library.properties +++ b/lib/TasmotaModbus-1.1.1/library.properties @@ -1,5 +1,5 @@ name=TasmotaModbus -version=1.1.0 +version=1.1.1 author=Theo Arends maintainer=Theo Arends sentence=Basic modbus wrapper for TasmotaSerial for ESP8266. diff --git a/lib/TasmotaModbus-1.1.0/src/TasmotaModbus.cpp b/lib/TasmotaModbus-1.1.1/src/TasmotaModbus.cpp similarity index 94% rename from lib/TasmotaModbus-1.1.0/src/TasmotaModbus.cpp rename to lib/TasmotaModbus-1.1.1/src/TasmotaModbus.cpp index 207fc07f8..842d242b2 100644 --- a/lib/TasmotaModbus-1.1.0/src/TasmotaModbus.cpp +++ b/lib/TasmotaModbus-1.1.1/src/TasmotaModbus.cpp @@ -100,7 +100,10 @@ uint8_t TasmotaModbus::ReceiveBuffer(uint8_t *buffer, uint8_t register_count) } if (len < 7) { return 7; } // 7 = Not enough data - if (len != buffer[2] + 5) { return 8; } // 8 = Unexpected result + if (len != buffer[2] + 5) { + buffer[2] = len - 5; // As it's wrong anyway let's store actual number received in here (5 will be added by client) + return 8; // 8 = Unexpected result + } uint16_t crc = (buffer[len -1] << 8) | buffer[len -2]; if (CalculateCRC(buffer, len -2) != crc) { return 9; } // 9 = crc error diff --git a/lib/TasmotaModbus-1.1.0/src/TasmotaModbus.h b/lib/TasmotaModbus-1.1.1/src/TasmotaModbus.h similarity index 100% rename from lib/TasmotaModbus-1.1.0/src/TasmotaModbus.h rename to lib/TasmotaModbus-1.1.1/src/TasmotaModbus.h