We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8356c26 commit c6d0041Copy full SHA for c6d0041
1 file changed
src/settings.cpp
@@ -81,11 +81,15 @@ void APB::Settings::load() {
81
}
82
83
void APB::Settings::loadDefaults() {
84
+#ifdef APB_DEFAULT_HOSTNAME
85
+ sprintf(_apConfiguration.essid, APB_DEFAULT_HOSTNAME);
86
+#else
87
String mac = WiFi.macAddress();
88
Log.traceln(LOG_SCOPE "Found mac address: `%s`", mac.c_str());
89
mac.replace(F(":"), F(""));
90
mac = mac.substring(6);
91
sprintf(_apConfiguration.essid, "AstroPowerBox-%s", mac.c_str());
92
+#endif
93
memset(_apConfiguration.psk, 0, APB_MAX_ESSID_PSK_SIZE);
94
Log.traceln(LOG_SCOPE "Using default ESSID: `%s`", _apConfiguration.essid);
95
loadDefaultStations();
0 commit comments