mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-04-28 03:46:41 +02:00
Implemented mDNS
This commit is contained in:
@@ -41,6 +41,9 @@ bool ConfigurationClass::write()
|
||||
wifi["hostname"] = config.WiFi_Hostname;
|
||||
wifi["aptimeout"] = config.WiFi_ApTimeout;
|
||||
|
||||
JsonObject mdns = doc.createNestedObject("mdns");
|
||||
mdns["enabled"] = config.Mdns_Enabled;
|
||||
|
||||
JsonObject ntp = doc.createNestedObject("ntp");
|
||||
ntp["server"] = config.Ntp_Server;
|
||||
ntp["timezone"] = config.Ntp_Timezone;
|
||||
@@ -191,6 +194,9 @@ bool ConfigurationClass::read()
|
||||
config.WiFi_Dhcp = wifi["dhcp"] | WIFI_DHCP;
|
||||
config.WiFi_ApTimeout = wifi["aptimeout"] | ACCESS_POINT_TIMEOUT;
|
||||
|
||||
JsonObject mdns = doc["mdns"];
|
||||
config.Mdns_Enabled = mdns["enabled"] | MDNS_ENABLED;
|
||||
|
||||
JsonObject ntp = doc["ntp"];
|
||||
strlcpy(config.Ntp_Server, ntp["server"] | NTP_SERVER, sizeof(config.Ntp_Server));
|
||||
strlcpy(config.Ntp_Timezone, ntp["timezone"] | NTP_TIMEZONE, sizeof(config.Ntp_Timezone));
|
||||
|
||||
Reference in New Issue
Block a user