Cleanup startup
This commit is contained in:
+4
-21
@@ -216,11 +216,13 @@ void setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HalSystem::checkPanic();
|
HalSystem::checkPanic();
|
||||||
|
|
||||||
SETTINGS.loadFromFile();
|
SETTINGS.loadFromFile();
|
||||||
|
HalSystem::clearPanic(); // TODO: move this to an activity when we have one to display the panic info
|
||||||
|
HalClock::applyTimezone(SETTINGS.timeZone);
|
||||||
I18N.loadSettings();
|
I18N.loadSettings();
|
||||||
KOREADER_STORE.loadFromFile();
|
KOREADER_STORE.loadFromFile();
|
||||||
OPDS_STORE.loadFromFile();
|
OPDS_STORE.loadFromFile();
|
||||||
|
WEATHER_SETTINGS.loadFromFile();
|
||||||
UITheme::getInstance().reload();
|
UITheme::getInstance().reload();
|
||||||
ButtonNavigator::setMappedInputManager(mappedInputManager);
|
ButtonNavigator::setMappedInputManager(mappedInputManager);
|
||||||
|
|
||||||
@@ -252,25 +254,6 @@ void setup() {
|
|||||||
// First serial output only here to avoid timing inconsistencies for power button press duration verification
|
// First serial output only here to avoid timing inconsistencies for power button press duration verification
|
||||||
LOG_DBG("MAIN", "Starting CrossPoint version " CROSSPOINT_VERSION);
|
LOG_DBG("MAIN", "Starting CrossPoint version " CROSSPOINT_VERSION);
|
||||||
|
|
||||||
// SD Card Initialization
|
|
||||||
// We need 6 open files concurrently when parsing a new chapter
|
|
||||||
if (!Storage.begin()) {
|
|
||||||
LOG_ERR("MAIN", "SD card initialization failed");
|
|
||||||
setupDisplayAndFonts();
|
|
||||||
activityManager.goToFullScreenMessage("SD card error", EpdFontFamily::BOLD);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
HalSystem::checkPanic();
|
|
||||||
HalSystem::clearPanic(); // TODO: move this to an activity when we have one to display the panic info
|
|
||||||
SETTINGS.loadFromFile();
|
|
||||||
HalClock::applyTimezone(SETTINGS.timeZone);
|
|
||||||
I18N.loadSettings();
|
|
||||||
KOREADER_STORE.loadFromFile();
|
|
||||||
WEATHER_SETTINGS.loadFromFile();
|
|
||||||
UITheme::getInstance().reload();
|
|
||||||
ButtonNavigator::setMappedInputManager(mappedInputManager);
|
|
||||||
|
|
||||||
setupDisplayAndFonts();
|
setupDisplayAndFonts();
|
||||||
|
|
||||||
activityManager.goToBoot();
|
activityManager.goToBoot();
|
||||||
@@ -429,4 +412,4 @@ void loop() {
|
|||||||
delay(10);
|
delay(10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user