From e621ee9965eb0a5c82b1629ee5a3b1a6a6fc433c Mon Sep 17 00:00:00 2001 From: reaper7 Date: Sun, 10 Nov 2019 12:09:07 +0100 Subject: [PATCH] new SDM 2.0.7 version for espsoftwareserial lib 6.0.0 or higher --- README.md | 5 +++-- SDM.cpp | 2 +- library.properties | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3f8e65..1066137 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ This library allows you reading SDM module(s) using: - [x] Software Serial, attached as core libraries for esp8266 and avr
(the new version of esp Software Serial library
has a different initialization compared to avr!
- This version of SDM library (2.0.4 - 2.0.6) works only with esp Software Serial 5.2.0 - 5.4.0!!!
+ This version of SDM library (2.0.7) works only with esp Software Serial 6.0.0 or higher!!!
If you have an older esp Software Serial version
- then use SDM library 2.0.3, details below the Credits section
)
+ then use other SDM library, details below the Credits section)
you also need rs232<->rs485 converter: - [x] with automatic flow direction control (look at images below) or @@ -274,6 +274,7 @@ other projects based on or using this library
--- +library version for old esp software serial (5.2.0 - 5.4.0) is available at [old_esp_swserial_520_540 branch](https://github.com/reaper7/SDM_Energy_Meter/tree/old_esp_swserial_520_540)
library version for old esp software serial (< 5.2.0) is available at [old_esp_swserial_lib branch](https://github.com/reaper7/SDM_Energy_Meter/tree/old_esp_swserial_lib)
old template library version is available at [old_template branch](https://github.com/reaper7/SDM_Energy_Meter/tree/old_template)
diff --git a/SDM.cpp b/SDM.cpp index d93e00a..8b2afe6 100644 --- a/SDM.cpp +++ b/SDM.cpp @@ -60,7 +60,7 @@ void SDM::begin(void) { #endif #else #if defined ( ESP8266 ) || defined ( ESP32 ) - sdmSer.begin(_baud, _rx_pin, _tx_pin, (SoftwareSerialConfig)_config); + sdmSer.begin(_baud, (SoftwareSerialConfig)_config, _rx_pin, _tx_pin); #else sdmSer.begin(_baud); #endif diff --git a/library.properties b/library.properties index bcda6ee..3861c36 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SDM -version=2.0.6 +version=2.0.7 author=Reaper7 maintainer=Reaper7 sentence=SDM 72/120/220/230/630 modbus energy meter