From d35625717187ed41c73db997dc79889780f3fad9 Mon Sep 17 00:00:00 2001 From: oepi-loepi Date: Tue, 7 Feb 2023 19:18:46 +0100 Subject: [PATCH] toonWater 1.1.22 1.1.22 - workaround for ESP 1.4.38 error for older versions --- Changelog.txt | 5 ++++- ToonWaterApp.qml | 14 +++++++++----- version.txt | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 3f45d20..39d1771 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,7 +1,10 @@ +1.1.22 +- workaround for ESP 1.4.38 error for older versions + + 1.1.21 - workaround for ESP 1.4.38 error - 1.1.20 - Version tracking of ESP diff --git a/ToonWaterApp.qml b/ToonWaterApp.qml index 088c515..2311e6b 100644 --- a/ToonWaterApp.qml +++ b/ToonWaterApp.qml @@ -191,11 +191,15 @@ App { // add an extra \" because of a firmware error if (debugOutput) console.log("*********Water http.responseText.indexOf : " + http.responseText.indexOf('ength\":\"')) - if(http.responseText.indexOf('ength\":\"') == -1){ - var n1 = http.responseText.indexOf('ength":') + 'engt\":'.length +1 - var newString = http.responseText.substring(0, n1) + "\"" + http.responseText.substring(n1, http.responseText.length) - JsonString = newString; - if (debugOutput) console.log("*********Water JsonString: " + JsonString) + + + if(http.responseText.indexOf('pulselength') > 0){ + if(http.responseText.indexOf('ength\":\"') == -1){ + var n1 = http.responseText.indexOf('ength":') + 'engt\":'.length +1 + var newString = http.responseText.substring(0, n1) + "\"" + http.responseText.substring(n1, http.responseText.length) + JsonString = newString; + if (debugOutput) console.log("*********Water JsonString: " + JsonString) + } } var JsonObject= JSON.parse(JsonString) diff --git a/version.txt b/version.txt index 1afdd22..4f774e9 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ -1.1.21 +1.1.22