Added ESP32thing, WIFI depending if STA is privided, check licence for WIfi open
This commit is contained in:
@@ -184,19 +184,12 @@ void saveWifiSettings() {
|
||||
preferences.putString("ssid", ssidSTA);
|
||||
preferences.putString("password", passwordSTA);
|
||||
preferences.end();
|
||||
Serial.printf("WLAN-Einstellungen gespeichert: SSID=%s, Passwort=%s\n", ssidSTA, passwordSTA);
|
||||
}
|
||||
|
||||
void loadWifiSettings() {
|
||||
preferences.begin("wifi", true);
|
||||
|
||||
// Speicher freigeben, falls bereits zugewiesen
|
||||
if (ssidSTA) {
|
||||
free(ssidSTA);
|
||||
}
|
||||
if (passwordSTA) {
|
||||
free(passwordSTA);
|
||||
}
|
||||
|
||||
// Neue Werte laden und dynamisch zuweisen
|
||||
String ssid = preferences.getString("ssid", "");
|
||||
String password = preferences.getString("password", "");
|
||||
@@ -282,6 +275,7 @@ void setup() {
|
||||
loadButtonConfig();
|
||||
loadBestTimes();
|
||||
loadSettings();
|
||||
loadWifiSettings();
|
||||
|
||||
setupWifi(); // WiFi initialisieren
|
||||
setupOTA(&server);
|
||||
|
||||
Reference in New Issue
Block a user