AP password now configurable
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "presets.h"
|
||||
#include "macros_bobbycar.h"
|
||||
|
||||
namespace presets {
|
||||
StringSettings makeDefaultStringSettings()
|
||||
@ -49,6 +50,7 @@ StringSettings makeDefaultStringSettings()
|
||||
},
|
||||
.otaServerUrl = {},
|
||||
#endif
|
||||
.ap_password = STRING(AP_PASSWORD),
|
||||
};
|
||||
}
|
||||
} // namespace presets
|
||||
|
@ -48,6 +48,7 @@ struct StringSettings
|
||||
#ifdef FEATURE_DNS_NS
|
||||
std::string dns_key;
|
||||
#endif
|
||||
std::string ap_password;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -116,6 +117,7 @@ void StringSettings::executeForEveryCommonSetting(T &&callable)
|
||||
#ifdef FEATURE_DNS_NS
|
||||
callable("dnskey", dns_key);
|
||||
#endif
|
||||
callable("ap_pw", ap_password);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -93,7 +93,7 @@ std::optional<wifi_stack::ap_config> wifi_create_ap_config()
|
||||
return wifi_stack::ap_config {
|
||||
.hostname = deviceName,
|
||||
.ssid = deviceName,
|
||||
.key = STRING(AP_PASSWORD),
|
||||
.key = stringSettings.ap_password,
|
||||
.static_ip = {
|
||||
.ip = {10, 0, 0, 1},
|
||||
.subnet = {255, 255, 255, 0},
|
||||
|
Reference in New Issue
Block a user