Skip to content

Commit

Permalink
remove json | false, as it will always default to false
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Oct 21, 2024
1 parent 120bdf6 commit 07d35fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/framework/MqttSettingsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions lib/framework/NetworkSettingsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/web/WebSettingsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
settings.fahrenheit = root["fahrenheit"];
EMSESP::system_.fahrenheit(settings.fahrenheit);

settings.readonly_mode = root["readonly_mode"] | false;
settings.readonly_mode = root["readonly_mode"];
EMSESP::system_.readonly_mode(settings.readonly_mode);

settings.developer_mode = root["developer_mode"] | false;
settings.developer_mode = root["developer_mode"];
EMSESP::system_.developer_mode(settings.developer_mode);

settings.bool_dashboard = root["bool_dashboard"] | EMSESP_DEFAULT_BOOL_FORMAT;
Expand Down

0 comments on commit 07d35fd

Please sign in to comment.