remove json | false, as it will always default to false

This commit is contained in:
proddy
2024-10-21 13:37:30 +02:00
parent 120bdf653d
commit 07d35fd19c
3 changed files with 6 additions and 6 deletions

View File

@@ -253,7 +253,7 @@ StateUpdateResult MqttSettings::update(JsonObject root, MqttSettings & settings)
bool changed = false;
#ifndef TASMOTA_SDK
newSettings.enableTLS = root["enableTLS"] | false;
newSettings.enableTLS = root["enableTLS"];
newSettings.rootCA = root["rootCA"] | "";
#else
newSettings.enableTLS = false;

View File

@@ -424,12 +424,12 @@ StateUpdateResult NetworkSettings::update(JsonObject root, NetworkSettings & set
settings.bssid = root["bssid"] | "";
settings.password = root["password"] | FACTORY_WIFI_PASSWORD;
settings.hostname = root["hostname"] | FACTORY_WIFI_HOSTNAME;
settings.staticIPConfig = root["static_ip_config"] | false;
settings.bandwidth20 = root["bandwidth20"] | false;
settings.staticIPConfig = root["static_ip_config"];
settings.bandwidth20 = root["bandwidth20"];
settings.tx_power = static_cast<uint8_t>(root["tx_power"] | 0);
settings.nosleep = root["nosleep"] | true;
settings.enableMDNS = root["enableMDNS"] | true;
settings.enableCORS = root["enableCORS"] | false;
settings.enableCORS = root["enableCORS"];
settings.CORSOrigin = root["CORSOrigin"] | "*";
// extended settings