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