|
@@ -99,6 +99,7 @@ void Settings::patch(JsonObject parsedSettings) {
|
|
|
this->setIfPresent(parsedSettings, "wifi_static_ip_netmask", wifiStaticIPNetmask);
|
|
this->setIfPresent(parsedSettings, "wifi_static_ip_netmask", wifiStaticIPNetmask);
|
|
|
this->setIfPresent(parsedSettings, "packet_repeats_per_loop", packetRepeatsPerLoop);
|
|
this->setIfPresent(parsedSettings, "packet_repeats_per_loop", packetRepeatsPerLoop);
|
|
|
this->setIfPresent(parsedSettings, "home_assistant_discovery_prefix", homeAssistantDiscoveryPrefix);
|
|
this->setIfPresent(parsedSettings, "home_assistant_discovery_prefix", homeAssistantDiscoveryPrefix);
|
|
|
|
|
+ this->setIfPresent(parsedSettings, "default_transition_period", defaultTransitionPeriod);
|
|
|
|
|
|
|
|
if (parsedSettings.containsKey("wifi_mode")) {
|
|
if (parsedSettings.containsKey("wifi_mode")) {
|
|
|
this->wifiMode = wifiModeFromString(parsedSettings["wifi_mode"]);
|
|
this->wifiMode = wifiModeFromString(parsedSettings["wifi_mode"]);
|
|
@@ -288,6 +289,7 @@ void Settings::serialize(Print& stream, const bool prettyPrint) {
|
|
|
root["packet_repeats_per_loop"] = this->packetRepeatsPerLoop;
|
|
root["packet_repeats_per_loop"] = this->packetRepeatsPerLoop;
|
|
|
root["home_assistant_discovery_prefix"] = this->homeAssistantDiscoveryPrefix;
|
|
root["home_assistant_discovery_prefix"] = this->homeAssistantDiscoveryPrefix;
|
|
|
root["wifi_mode"] = wifiModeToString(this->wifiMode);
|
|
root["wifi_mode"] = wifiModeToString(this->wifiMode);
|
|
|
|
|
+ root["default_transition_period"] = this->defaultTransitionPeriod;
|
|
|
|
|
|
|
|
JsonArray channelArr = root.createNestedArray("rf24_channels");
|
|
JsonArray channelArr = root.createNestedArray("rf24_channels");
|
|
|
JsonHelpers::vectorToJsonArr<RF24Channel, String>(channelArr, rf24Channels, RF24ChannelHelpers::nameFromValue);
|
|
JsonHelpers::vectorToJsonArr<RF24Channel, String>(channelArr, rf24Channels, RF24ChannelHelpers::nameFromValue);
|