mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-10-28 11:14:58 +00:00
Merge pull request #3256 from proddy/main
copy over 3.9.0-dev optimizations to load pre_load.json faster
This commit is contained in:
+9
-8
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user