Liu Song’s Projects


~/Projects/Tasmota

git clone https://code.lsong.org/Tasmota

Commit

Commit
f8df9e5f00f12f9ff383fa4484965ff92fc2f992
Author
s-hadinger <49731213+[email protected]>
Date
2023-06-02 13:29:57 +0200 +0200
Diffstat
 CHANGELOG.md | 2 ++
 lib/libesp32/berry_tasmota/src/be_webclient_lib.c | 2 +-
 tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_webclient.ino | 6 +++---

Berry `webclient.url_encode()` is now a static class method, no change required to existing code (#18775)


diff --git a/CHANGELOG.md b/CHANGELOG.md
index f833e28c1f67763e73c1792b3669fe9a42345c07..f902a38022b0f3a37443454f8edfb56080906703 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,8 @@ - InfluxDb resolves DNS name before request (#18015)
 - Shutter sliders in WEBGUI automatically appear and disappear during configuration and update during movement (#18701)
 - AdafruitFingerprint library from v2.0.4 to v2.1.0
 
+- Flowrate meter flow amount/duration, show values in table format (#16385)
+
 ### Fixed
 - ESP32 InfluxDb initial connection delays using HTTPClient (#18015)
 - Shutter bootloop using more than 4 shutters (#18673)




diff --git a/lib/libesp32/berry_tasmota/src/be_webclient_lib.c b/lib/libesp32/berry_tasmota/src/be_webclient_lib.c
index a5c888d012ae45e846c46a2e4b95beb8e35e967f..6458169a5642b28f4ff13635363beac5bc76c667 100644
--- a/lib/libesp32/berry_tasmota/src/be_webclient_lib.c
+++ b/lib/libesp32/berry_tasmota/src/be_webclient_lib.c
@@ -45,7 +45,7 @@     .p, var
     .w, var
     init, func(wc_init)
     deinit, func(wc_deinit)
-    url_encode, func(wc_urlencode)
+    url_encode, static_func(wc_urlencode)
 
     begin, func(wc_begin)
     set_timeouts, func(wc_set_timeouts)




diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_webclient.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_webclient.ino
index 17d5908797ff06bd426e9a3d1cd6a8c8df0fc262..f813265703ea74de1791c761315ab7bd9b6e03b6 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_webclient.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_webclient.ino
@@ -153,13 +153,13 @@     be_setmember(vm, 1, ".p");
     be_return_nil(vm);
   }
 
-  // wc.url_encode(string) -> string
+  // wc.url_encode(string) -> string  (static method)
   int32_t wc_urlencode(struct bvm *vm);
   int32_t wc_urlencode(struct bvm *vm) {
     int32_t argc = be_top(vm);
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry
+
-      const char * s = be_tostring(vm, 2);
+      const char * s = be_tostring(vm, 1);
       String url = wc_UrlEncode(String(s));
       be_pushstring(vm, url.c_str());
       be_return(vm);  /* return self */