Compare commits

...

9 Commits

Author SHA1 Message Date
Ricardo Guzman (Richonguzman) e31dbbf91f testing1 2026-03-08 10:43:51 -03:00
Ricardo Guzman (Richonguzman) 11c36a91fb Safe Poing V3.2.2 2026-03-08 10:32:18 -03:00
Ricardo Guzman (Richonguzman) a97ffe709f Merge pull request #407 from richonguzman/backBefore-FIX-OTA
Back before fix ota
2026-03-08 10:21:40 -03:00
Ricardo Guzman (Richonguzman) c80b565730 Merge branch 'main' into backBefore-FIX-OTA 2026-03-08 10:18:44 -03:00
Ricardo Guzman (Richonguzman) 84cbcc30e8 intentando arreglar 2026-03-08 10:12:57 -03:00
Ricardo Guzman (Richonguzman) 11d413cb17 corrigiendo desorden 2026-03-08 10:11:43 -03:00
Ricardo Guzman (Richonguzman) 19d767e3cb corrigiendo desorden 2026-03-08 10:11:10 -03:00
Ricardo Guzman (Richonguzman) 803bde1008 Merge pull request #405 from petrkr/fixconfig
Fix OTA update due bad configuration behaviour
2026-03-08 09:51:40 -03:00
Petr Kracík 35760b74f7 Fix OTA update due bad configuration behaviour 2026-03-06 03:49:11 +01:00
3 changed files with 24 additions and 23 deletions
+2 -2
View File
@@ -195,13 +195,13 @@ public:
REMOTE_MANAGEMENT remoteManagement;
MQTT mqtt;
void setup();
void setDefaultValues();
bool writeFile();
Configuration();
private:
bool readFile();
String _filePath;
};
#endif
#endif
+3 -2
View File
@@ -68,7 +68,7 @@ ___________________________________________________________________*/
String versionDate = "2026-03-08";
String versionNumber = "3.3";
String versionNumber = "3.2.103";
Configuration Config;
WiFiClient aprsIsClient;
WiFiClient mqttClient;
@@ -101,6 +101,7 @@ String firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seven
void setup() {
Serial.begin(115200);
Config.setup();
POWER_Utils::setup();
Utils::setupDisplay();
LoRa_Utils::setup();
@@ -216,4 +217,4 @@ void loop() {
Utils::checkRebootTime();
Utils::checkSleepByLowBatteryVoltage(1);
}
}
}
+19 -19
View File
@@ -26,6 +26,25 @@
bool shouldSleepStop = true;
void Configuration::setup() {
if (!SPIFFS.begin(false)) {
Serial.println("SPIFFS Mount Failed");
return;
} else {
Serial.println("SPIFFS Mounted");
}
bool exists = SPIFFS.exists("/igate_conf.json");
if (!exists) {
setDefaultValues();
writeFile();
delay(1000);
ESP.restart();
}
readFile();
}
bool Configuration::writeFile() {
Serial.println("Saving configuration...");
@@ -557,23 +576,4 @@ void Configuration::setDefaultValues() {
rememberStationTime = 30;
Serial.println("New Data Created... All is Written!");
}
Configuration::Configuration() {
if (!SPIFFS.begin(false)) {
Serial.println("SPIFFS Mount Failed");
return;
} else {
Serial.println("SPIFFS Mounted");
}
bool exists = SPIFFS.exists("/igate_conf.json");
if (!exists) {
setDefaultValues();
writeFile();
delay(1000);
ESP.restart();
}
readFile();
}