Added new parameter and fixed ifdef
This commit is contained in:
@ -50,8 +50,15 @@ StringSettings makeDefaultStringSettings()
|
||||
},
|
||||
.otaServerUrl = {},
|
||||
#endif
|
||||
#ifdef AP_PASSWORD
|
||||
.ap_password = STRING(AP_PASSWORD),
|
||||
.otaServerBranch = {}
|
||||
#else
|
||||
.ap_password = "Bobbycar_123",
|
||||
#endif
|
||||
#ifdef FEATURE_OTA
|
||||
.otaServerBranch = {},
|
||||
#endif
|
||||
.webserver_password = STRING(AP_PASSWORD),
|
||||
};
|
||||
}
|
||||
} // namespace presets
|
||||
|
@ -49,7 +49,10 @@ struct StringSettings
|
||||
std::string dns_key;
|
||||
#endif
|
||||
std::string ap_password;
|
||||
#ifdef FEATURE_OTA
|
||||
std::string otaServerBranch;
|
||||
#endif
|
||||
std::string webserver_password;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -114,12 +117,13 @@ void StringSettings::executeForEveryCommonSetting(T &&callable)
|
||||
// callable("otaUrl9", otaServers[9].url);
|
||||
|
||||
callable("otaserver", otaServerUrl);
|
||||
callable("otaBranch", otaServerBranch);
|
||||
#endif
|
||||
#ifdef FEATURE_DNS_NS
|
||||
callable("dnskey", dns_key);
|
||||
#endif
|
||||
callable("ap_pw", ap_password);
|
||||
callable("otaBranch", otaServerBranch);
|
||||
callable("webpw", webserver_password);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
Reference in New Issue
Block a user