mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-13 21:54:07 +00:00
Compare commits
3
Commits
835a8762f6
...
5b41217a67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b41217a67 | ||
|
|
16caff789d | ||
|
|
90f0c9c01b |
@@ -16,6 +16,7 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
|
|||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
- shunting yard show json
|
- shunting yard show json
|
||||||
|
- memory leak when using different timezones for ems-esp and thermostat[#3184](https://github.com/emsesp/EMS-ESP32/issues/3184)
|
||||||
- LED stayed off on a healthy system when "Disable LED" was unchecked
|
- LED stayed off on a healthy system when "Disable LED" was unchecked
|
||||||
- Ethernet MAC address changed with the new SDK, breaking DHCP reservations (currently disabled)
|
- Ethernet MAC address changed with the new SDK, breaking DHCP reservations (currently disabled)
|
||||||
- "IPv4 nameserver" showed an IPv6 address when IPv6 was in use
|
- "IPv4 nameserver" showed an IPv6 address when IPv6 was in use
|
||||||
|
|||||||
@@ -77,13 +77,15 @@ void NTPSettings::read(NTPSettings & settings, JsonObject root) {
|
|||||||
root["enabled"] = settings.enabled;
|
root["enabled"] = settings.enabled;
|
||||||
root["server"] = settings.server;
|
root["server"] = settings.server;
|
||||||
root["tz_label"] = settings.tzLabel;
|
root["tz_label"] = settings.tzLabel;
|
||||||
root["tz_format"] = settings.tzFormat;
|
root["tz_format"] = settings.tzFormat.substring(0, settings.tzFormat.indexOf(" "));
|
||||||
root["thermostat_sync"] = settings.thermostat_sync;
|
root["thermostat_sync"] = settings.thermostat_sync;
|
||||||
root["tz_label_t"] = settings.tzLabelT;
|
root["tz_label_t"] = settings.tzLabelT;
|
||||||
root["tz_format_t"] = settings.tzFormatT;
|
root["tz_format_t"] = settings.tzFormatT.substring(0, settings.tzFormatT.indexOf(" "));
|
||||||
}
|
}
|
||||||
|
|
||||||
StateUpdateResult NTPSettings::update(JsonObject root, NTPSettings & settings) {
|
StateUpdateResult NTPSettings::update(JsonObject root, NTPSettings & settings) {
|
||||||
|
settings.tzFormat.reserve(40);
|
||||||
|
settings.tzFormatT.reserve(40);
|
||||||
settings.enabled = root["enabled"] | FACTORY_NTP_ENABLED;
|
settings.enabled = root["enabled"] | FACTORY_NTP_ENABLED;
|
||||||
settings.server = root["server"] | FACTORY_NTP_SERVER;
|
settings.server = root["server"] | FACTORY_NTP_SERVER;
|
||||||
settings.tzLabel = root["tz_label"] | FACTORY_NTP_TIME_ZONE_LABEL;
|
settings.tzLabel = root["tz_label"] | FACTORY_NTP_TIME_ZONE_LABEL;
|
||||||
@@ -91,5 +93,12 @@ StateUpdateResult NTPSettings::update(JsonObject root, NTPSettings & settings) {
|
|||||||
settings.thermostat_sync = root["thermostat_sync"] | FACTORY_NTP_THERMOSTAT_SYNC;
|
settings.thermostat_sync = root["thermostat_sync"] | FACTORY_NTP_THERMOSTAT_SYNC;
|
||||||
settings.tzLabelT = root["tz_label_t"] | FACTORY_NTP_TIME_ZONE_LABEL;
|
settings.tzLabelT = root["tz_label_t"] | FACTORY_NTP_TIME_ZONE_LABEL;
|
||||||
settings.tzFormatT = root["tz_format_t"] | FACTORY_NTP_TIME_ZONE_FORMAT;
|
settings.tzFormatT = root["tz_format_t"] | FACTORY_NTP_TIME_ZONE_FORMAT;
|
||||||
|
// The format string must have same length to avoid memory leak, #3184
|
||||||
|
while (settings.tzFormat.length() < 40) {
|
||||||
|
settings.tzFormat += " ";
|
||||||
|
}
|
||||||
|
while (settings.tzFormatT.length() < 40) {
|
||||||
|
settings.tzFormatT += " ";
|
||||||
|
}
|
||||||
return StateUpdateResult::CHANGED;
|
return StateUpdateResult::CHANGED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.9.0-dev.1"
|
#define EMSESP_APP_VERSION "3.9.0-dev.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user