From 479b378707da6ac40b759ba0c60a76f56ee1cf93 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 6 Jan 2022 14:06:56 +0100 Subject: [PATCH] Fix Modbus serial config --- CHANGELOG.md | 7 +++++-- RELEASENOTES.md | 4 ++++ .../{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/README.md | 0 .../examples/swsertest/swsertest.ino | 0 .../keywords.txt | 0 .../library.json | 2 +- .../library.properties | 2 +- .../src/TasmotaSerial.cpp | 0 .../src/TasmotaSerial.h | 0 .../{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/README.md | 0 .../examples/modbustest/modbustest.ino | 0 .../keywords.txt | 0 .../library.json | 2 +- .../library.properties | 2 +- .../src/TasmotaModbus.cpp | 4 ++-- .../src/TasmotaModbus.h | 2 +- 16 files changed, 16 insertions(+), 9 deletions(-) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/README.md (100%) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/examples/swsertest/swsertest.ino (100%) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/keywords.txt (100%) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/library.json (94%) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/library.properties (94%) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/src/TasmotaSerial.cpp (100%) rename lib/default/{TasmotaSerial-3.3.0 => TasmotaSerial-3.4.0}/src/TasmotaSerial.h (100%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/README.md (100%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/examples/modbustest/modbustest.ino (100%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/keywords.txt (100%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/library.json (93%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/library.properties (93%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/src/TasmotaModbus.cpp (98%) rename lib/lib_basic/{TasmotaModbus-1.2.0 => TasmotaModbus-3.4.0}/src/TasmotaModbus.h (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ca946200..c2c5c0388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,15 @@ All notable changes to this project will be documented in this file. ### Changed - PubSubClient library from v2.8.12 to v2.8.13 +- TasmotaSerial library from v3.3.0 to v3.4.0 +- TasmotaModbus library from v1.2.0 to v3.4.0 - From Semantic Versioning (SemVer) to Calendar Versioning (CalVer) -- Set ESP32 stack size with ``#define SET_ESP32_STACK_SIZE``, added ``StackLowMark`` metrics -- Berry stores compiled bytecode into IRAM, freeing space in heap +- ESP32 Set stack size with ``#define SET_ESP32_STACK_SIZE``, added ``StackLowMark`` metrics +- ESP32 Berry stores compiled bytecode into IRAM, freeing space in heap (#14307) ### Fixed - Intermittent exceptions and heap corruption due to PubSubClient library buffer overflow (#13700) +- Modbus serial config regression from v10.1.0.3 ## [10.1.0.3] 20211231 ### Added diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 2563a54b2..34a441891 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -114,11 +114,15 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo ### Changed - PubSubClient library from v2.8.12 to v2.8.13 +- TasmotaSerial library from v3.3.0 to v3.4.0 +- TasmotaModbus library from v1.2.0 to v3.4.0 - ESP8266Audio library from v1.9.2 to v1.9.5 - ESP8266SAM library from v1.0 to v1.0.1 - From Semantic Versioning (SemVer) to Calendar Versioning (CalVer) - Mitsubishi HVAC temperature resolution [#13936](https://github.com/arendst/Tasmota/issues/13936) - Remove restriction of topic must differ from mqttclient [#14019](https://github.com/arendst/Tasmota/issues/14019) +- ESP32 Set stack size with ``#define SET_ESP32_STACK_SIZE``, added ``StackLowMark`` metrics +- ESP32 Berry stores compiled bytecode into IRAM, freeing space in heap [#14307](https://github.com/arendst/Tasmota/issues/14307) ### Fixed - Intermittent exceptions and heap corruption due to PubSubClient library buffer overflow [#13700](https://github.com/arendst/Tasmota/issues/13700) diff --git a/lib/default/TasmotaSerial-3.3.0/README.md b/lib/default/TasmotaSerial-3.4.0/README.md similarity index 100% rename from lib/default/TasmotaSerial-3.3.0/README.md rename to lib/default/TasmotaSerial-3.4.0/README.md diff --git a/lib/default/TasmotaSerial-3.3.0/examples/swsertest/swsertest.ino b/lib/default/TasmotaSerial-3.4.0/examples/swsertest/swsertest.ino similarity index 100% rename from lib/default/TasmotaSerial-3.3.0/examples/swsertest/swsertest.ino rename to lib/default/TasmotaSerial-3.4.0/examples/swsertest/swsertest.ino diff --git a/lib/default/TasmotaSerial-3.3.0/keywords.txt b/lib/default/TasmotaSerial-3.4.0/keywords.txt similarity index 100% rename from lib/default/TasmotaSerial-3.3.0/keywords.txt rename to lib/default/TasmotaSerial-3.4.0/keywords.txt diff --git a/lib/default/TasmotaSerial-3.3.0/library.json b/lib/default/TasmotaSerial-3.4.0/library.json similarity index 94% rename from lib/default/TasmotaSerial-3.3.0/library.json rename to lib/default/TasmotaSerial-3.4.0/library.json index f6d1aaaeb..e9e2294fb 100644 --- a/lib/default/TasmotaSerial-3.3.0/library.json +++ b/lib/default/TasmotaSerial-3.4.0/library.json @@ -1,6 +1,6 @@ { "name": "TasmotaSerial", - "version": "3.3.0", + "version": "3.4.0", "keywords": [ "serial", "io", "TasmotaSerial" ], diff --git a/lib/default/TasmotaSerial-3.3.0/library.properties b/lib/default/TasmotaSerial-3.4.0/library.properties similarity index 94% rename from lib/default/TasmotaSerial-3.3.0/library.properties rename to lib/default/TasmotaSerial-3.4.0/library.properties index 6b43764a6..d254a7355 100644 --- a/lib/default/TasmotaSerial-3.3.0/library.properties +++ b/lib/default/TasmotaSerial-3.4.0/library.properties @@ -1,5 +1,5 @@ name=TasmotaSerial -version=3.3.0 +version=3.4.0 author=Theo Arends maintainer=Theo Arends sentence=Implementation of software serial with hardware serial fallback for ESP8266 and ESP32. diff --git a/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp b/lib/default/TasmotaSerial-3.4.0/src/TasmotaSerial.cpp similarity index 100% rename from lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp rename to lib/default/TasmotaSerial-3.4.0/src/TasmotaSerial.cpp diff --git a/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.h b/lib/default/TasmotaSerial-3.4.0/src/TasmotaSerial.h similarity index 100% rename from lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.h rename to lib/default/TasmotaSerial-3.4.0/src/TasmotaSerial.h diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/README.md b/lib/lib_basic/TasmotaModbus-3.4.0/README.md similarity index 100% rename from lib/lib_basic/TasmotaModbus-1.2.0/README.md rename to lib/lib_basic/TasmotaModbus-3.4.0/README.md diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/examples/modbustest/modbustest.ino b/lib/lib_basic/TasmotaModbus-3.4.0/examples/modbustest/modbustest.ino similarity index 100% rename from lib/lib_basic/TasmotaModbus-1.2.0/examples/modbustest/modbustest.ino rename to lib/lib_basic/TasmotaModbus-3.4.0/examples/modbustest/modbustest.ino diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/keywords.txt b/lib/lib_basic/TasmotaModbus-3.4.0/keywords.txt similarity index 100% rename from lib/lib_basic/TasmotaModbus-1.2.0/keywords.txt rename to lib/lib_basic/TasmotaModbus-3.4.0/keywords.txt diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/library.json b/lib/lib_basic/TasmotaModbus-3.4.0/library.json similarity index 93% rename from lib/lib_basic/TasmotaModbus-1.2.0/library.json rename to lib/lib_basic/TasmotaModbus-3.4.0/library.json index 3c28959ea..9c93d13b5 100644 --- a/lib/lib_basic/TasmotaModbus-1.2.0/library.json +++ b/lib/lib_basic/TasmotaModbus-3.4.0/library.json @@ -1,6 +1,6 @@ { "name": "TasmotaModbus", - "version": "1.2.0", + "version": "3.4.0", "keywords": [ "serial", "io", "TasmotaModbus" ], diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/library.properties b/lib/lib_basic/TasmotaModbus-3.4.0/library.properties similarity index 93% rename from lib/lib_basic/TasmotaModbus-1.2.0/library.properties rename to lib/lib_basic/TasmotaModbus-3.4.0/library.properties index 7ac182843..748962a53 100644 --- a/lib/lib_basic/TasmotaModbus-1.2.0/library.properties +++ b/lib/lib_basic/TasmotaModbus-3.4.0/library.properties @@ -1,5 +1,5 @@ name=TasmotaModbus -version=1.2.0 +version=3.4.0 author=Theo Arends maintainer=Theo Arends sentence=Basic modbus wrapper for TasmotaSerial for ESP8266. diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/src/TasmotaModbus.cpp b/lib/lib_basic/TasmotaModbus-3.4.0/src/TasmotaModbus.cpp similarity index 98% rename from lib/lib_basic/TasmotaModbus-1.2.0/src/TasmotaModbus.cpp rename to lib/lib_basic/TasmotaModbus-3.4.0/src/TasmotaModbus.cpp index 8c2180505..bd9b7a06b 100644 --- a/lib/lib_basic/TasmotaModbus-1.2.0/src/TasmotaModbus.cpp +++ b/lib/lib_basic/TasmotaModbus-3.4.0/src/TasmotaModbus.cpp @@ -42,11 +42,11 @@ uint16_t TasmotaModbus::CalculateCRC(uint8_t *frame, uint8_t num) return crc; } -int TasmotaModbus::Begin(long speed, int stop_bits) +int TasmotaModbus::Begin(long speed, uint32_t config) { int result = 0; - if (begin(speed, stop_bits)) { + if (begin(speed, config)) { result = 1; if (hardwareSerial()) { result = 2; } } diff --git a/lib/lib_basic/TasmotaModbus-1.2.0/src/TasmotaModbus.h b/lib/lib_basic/TasmotaModbus-3.4.0/src/TasmotaModbus.h similarity index 96% rename from lib/lib_basic/TasmotaModbus-1.2.0/src/TasmotaModbus.h rename to lib/lib_basic/TasmotaModbus-3.4.0/src/TasmotaModbus.h index d6c0c2883..78fc3d50b 100644 --- a/lib/lib_basic/TasmotaModbus-1.2.0/src/TasmotaModbus.h +++ b/lib/lib_basic/TasmotaModbus-3.4.0/src/TasmotaModbus.h @@ -30,7 +30,7 @@ class TasmotaModbus : public TasmotaSerial { TasmotaModbus(int receive_pin, int transmit_pin); virtual ~TasmotaModbus() {} - int Begin(long speed = TM_MODBUS_BAUDRATE, int stop_bits = 1); + int Begin(long speed = TM_MODBUS_BAUDRATE, uint32_t config = SERIAL_8N1); uint16_t CalculateCRC(uint8_t *frame, uint8_t num);