Location Speichern geht? abrufen der gespeicherten location aus properties muss noch gemacht werden
This commit is contained in:
@@ -184,24 +184,35 @@ void saveWifiSettings() {
|
||||
preferences.putString("ssid", ssidSTA);
|
||||
preferences.putString("password", passwordSTA);
|
||||
preferences.end();
|
||||
Serial.printf("WLAN-Einstellungen gespeichert: SSID=%s, Passwort=%s\n", ssidSTA, passwordSTA);
|
||||
delay(500); // Warte 2 Sekunden, bevor der Neustart erfolgt
|
||||
ESP.restart(); // Neustart des ESP32
|
||||
}
|
||||
|
||||
void loadLocationSettings() {
|
||||
preferences.begin("location", true);
|
||||
masterlocation = preferences.getString("location", "");
|
||||
preferences.end();
|
||||
}
|
||||
|
||||
void saveLocationSettings() {
|
||||
preferences.begin("location", false);
|
||||
preferences.putString("location", masterlocation);
|
||||
preferences.end();
|
||||
}
|
||||
|
||||
void loadWifiSettings() {
|
||||
preferences.begin("wifi", true);
|
||||
|
||||
// Neue Werte laden und dynamisch zuweisen
|
||||
String ssid = preferences.getString("ssid", "");
|
||||
String password = preferences.getString("password", "");
|
||||
ssidSTA = strdup(ssid.c_str());
|
||||
passwordSTA = strdup(password.c_str());
|
||||
|
||||
preferences.end();
|
||||
|
||||
// Debug-Ausgabe
|
||||
Serial.printf("WLAN-Einstellungen geladen: SSID=%s, Passwort=%s\n", ssidSTA, passwordSTA);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int checkLicence() {
|
||||
loadLicenceFromPrefs();
|
||||
String id = getUniqueDeviceID();
|
||||
|
||||
Reference in New Issue
Block a user