copy over 3.9.0-dev optimizations to load pre_load.json faster without boot

This commit is contained in:
proddy
2026-09-27 15:47:54 +02:00
parent 0798775cd4
commit bb19e7102e
2 changed files with 10 additions and 9 deletions
+9 -8
View File
@@ -1726,6 +1726,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 (network, mqtt, ap, ntp etc)
esp32React.begin();
@@ -1773,14 +1782,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
LOG_DEBUG("eFuse device information: %s", system_.getBBQKeesGatewayDetails().isEmpty() ? "not set" : system_.getBBQKeesGatewayDetails().c_str());
webSettingsService.begin(); // load EMS-ESP Application settings
+1 -1
View File
@@ -451,7 +451,7 @@ void System::system_restart(const char * partitionname) {
EMSuart::stop(); // stop UART so there is no interference
#ifndef EMSESP_STANDALONE
delay(1000); // wait 1 second
delay(500); // wait 0.5 second
ESP.restart(); // ka-boom! - this is the only place where the ESP32 restart is called
#endif
}