prevent reboot on filesystem upload

This commit is contained in:
proddy
2026-09-26 21:03:17 +02:00
parent 684d6b132d
commit 7c6101e819
2 changed files with 21 additions and 19 deletions
+9 -8
View File
@@ -1774,6 +1774,15 @@ void EMSESP::start() {
// start web log service. now we can start capturing logs to the web log
webLogService.begin();
#ifndef EMSESP_STANDALONE
// apply any uploaded settings before any service loads them from the filesystem
if (system_.check_restore()) {
root = LittleFS.open(EMSESP_SETTINGS_FILE);
factory_settings = !root;
root.close();
}
#endif
// loads core system services settings (mqtt, ap, ntp etc)
esp32React.begin();
@@ -1829,14 +1838,6 @@ void EMSESP::start() {
LOG_INFO("Last system reset reason Core0: %s, Core1: %s", system_.reset_reason(0).c_str(), system_.reset_reason(1).c_str());
#endif
// see if we're restoring a settings file
#ifndef EMSESP_STANDALONE
if (system_.check_restore()) {
LOG_WARNING("EMS-ESP will restart to apply new settings. Please wait.");
system_.system_restart();
};
#endif
webSettingsService.begin(); // load EMS-ESP Application settings
LOG_DEBUG("System name: %s", system_.system_name().c_str());