mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-05-07 13:44:26 +02:00
testeando ultimos valores
This commit is contained in:
@@ -185,7 +185,7 @@ public:
|
||||
REMOTE_MANAGEMENT remoteManagement;
|
||||
MQTT mqtt;
|
||||
|
||||
void init();
|
||||
void setDefaultValues();
|
||||
bool writeFile();
|
||||
Configuration();
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ bool Configuration::readFile() {
|
||||
if (needsRewrite) {
|
||||
Serial.println("Config JSON incomplete, rewriting...");
|
||||
writeFile();
|
||||
delay(1000);
|
||||
delay(500);
|
||||
ESP.restart();
|
||||
}
|
||||
Serial.println("Config read successfuly");
|
||||
@@ -382,7 +382,7 @@ bool Configuration::readFile() {
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::init() {
|
||||
void Configuration::setDefaultValues() {
|
||||
|
||||
WiFi_AP wifiap;
|
||||
wifiap.ssid = "";
|
||||
@@ -504,8 +504,9 @@ Configuration::Configuration() {
|
||||
|
||||
bool exists = SPIFFS.exists("/igate_conf.json");
|
||||
if (!exists) {
|
||||
init();
|
||||
setDefaultValues();
|
||||
writeFile();
|
||||
delay(500);
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -296,7 +296,7 @@ namespace WEB_Utils {
|
||||
request->send(response);
|
||||
|
||||
displayToggle(false);
|
||||
delay(1000); // Dar tiempo al guardado
|
||||
delay(500);
|
||||
ESP.restart();
|
||||
} else {
|
||||
Serial.println("Error saving configuration!");
|
||||
|
||||
Reference in New Issue
Block a user