diff --git a/src/CHANGES.md b/src/CHANGES.md index 4e5900ad..f4c89d23 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,9 @@ # Development Changes +## 0.6.7 - 2023-04-13 +* merge PR #883, improved store of settings and javascript, thx @tastendruecker123 +* support `.` and `,` as floating point seperator in setup #881 + ## 0.6.6 - 2023-04-12 * increased distance for `import` button in mobile view #879 * changed `led_high_active` to `bool` #879 diff --git a/src/defines.h b/src/defines.h index b3a961a1..1ace50df 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 6 -#define VERSION_PATCH 6 +#define VERSION_PATCH 7 //------------------------------------- typedef struct { diff --git a/src/web/html/api.js b/src/web/html/api.js index cdc9e748..13ca50b5 100644 --- a/src/web/html/api.js +++ b/src/web/html/api.js @@ -103,11 +103,9 @@ function parseVersion(obj) { } function parseESP(obj) { - if(document.getElementById("esp_type").childNodes.length < 1) { - document.getElementById("esp_type").append( - document.createTextNode("Board: " + obj["esp_type"]) - ); - } + document.getElementById("esp_type").replaceChildren( + document.createTextNode("Board: " + obj["esp_type"]) + ); } function parseRssi(obj) { diff --git a/src/web/html/save.html b/src/web/html/save.html index f3b1896d..4c924c40 100644 --- a/src/web/html/save.html +++ b/src/web/html/save.html @@ -13,7 +13,6 @@ {#HTML_FOOTER} - + {#HTML_NAV}
-
+
@@ -147,11 +136,11 @@
Interval [s]
-
+
Max retries per Payload
-
+
Reset values and YieldDay at midnight
@@ -178,7 +167,7 @@
NTP Port
-
+
set system time
@@ -195,15 +184,13 @@
Sunrise & Sunset -

Use a decimal separator: '.' (dot) for Latitude and Longitude

-
Latitude (decimal)
-
+
Longitude (decimal)
-
+
Offset (pre sunrise, post sunset)
@@ -226,7 +213,7 @@
Port
-
+
Username (optional)
@@ -243,7 +230,7 @@

Send Inverter data in a fixed interval, even if there is no change. A value of '0' disables the fixed interval. The data is published once it was successfully received from inverter. (default: 0)

Interval [s]
-
+
Discovery Config (homeassistant)
@@ -292,11 +279,13 @@
Import / Export JSON Settings
-
Import
-
+
Import
+
- - +
+
+
+
@@ -419,6 +408,24 @@ const re = /11[2,4,6]1.*/; + window.onload = function() { + for(it of document.getElementsByClassName("s_collapsible")) { + it.addEventListener("click", function() { + this.classList.toggle("active"); + var content = this.nextElementSibling; + content.style.display = (content.style.display === "block") ? "none" : "block"; + }); + } + + document.getElementById("settings").addEventListener("submit", function() { + var inputs = document.querySelectorAll("input[type='number']"); + for (var i = 0; i < inputs.length; i++) { + if (inputs[i].value.indexOf(",") != -1) + inputs[i].value = inputs[i].value.replace(",", "."); + } + }); + } + document.getElementById("btnAdd").addEventListener("click", function() { if(highestId <= (maxInv-1)) { ivHtml(JSON.parse('{"enabled":true,"name":"","serial":"","channels":4,"ch_max_pwr":[0,0,0,0],"ch_name":["","","",""],"ch_yield_cor":[0,0,0,0]}'), highestId);