Feature: upload customization settings from a file #256

This commit is contained in:
Proddy
2022-05-07 17:49:02 +02:00
parent f243162724
commit 9923b60d64
26 changed files with 348 additions and 352 deletions

View File

@@ -1374,7 +1374,7 @@ void EMSESP::start() {
// start the file system
#ifndef EMSESP_STANDALONE
if (!LITTLEFS.begin(true)) {
Serial.println("LITTLEFS Mount Failed. EMS-ESP stopped.");
Serial.println("LITTLEFS Mount failed. EMS-ESP stopped.");
return;
}
#endif
@@ -1383,6 +1383,12 @@ void EMSESP::start() {
webLogService.begin(); // start web log service. now we can start capturing logs to the web log
LOG_INFO(F("Last system reset reason Core0: %s, Core1: %s"), system_.reset_reason(0).c_str(), system_.reset_reason(1).c_str());
// do any system upgrades
if (system_.check_upgrade()) {
LOG_INFO(F("System will be restarted to apply upgrade"));
system_.system_restart();
};
webSettingsService.begin(); // load EMS-ESP Application settings...
system_.reload_settings(); // ... and store some of the settings locally
webCustomizationService.begin(); // load the customizations
@@ -1392,8 +1398,6 @@ void EMSESP::start() {
console_.start_telnet();
}
system_.check_upgrade(); // do any system upgrades
// start all the EMS-ESP services
mqtt_.start(); // mqtt init
system_.start(); // starts commands, led, adc, button, network, syslog & uart