mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-01-23 01:00:15 +01:00
testeando ultimos valores
This commit is contained in:
parent
d5930380b4
commit
8eb4ef1dc2
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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!");
|
||||
|
|
|
|||
Loading…
Reference in a new issue