Cleanup startup

This commit is contained in:
jpirnay
2026-04-23 16:44:27 +02:00
parent 42fa3a4ac8
commit 9621dc1181
+4 -21
View File
@@ -216,11 +216,13 @@ void setup() {
}
HalSystem::checkPanic();
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();
KOREADER_STORE.loadFromFile();
OPDS_STORE.loadFromFile();
WEATHER_SETTINGS.loadFromFile();
UITheme::getInstance().reload();
ButtonNavigator::setMappedInputManager(mappedInputManager);
@@ -252,25 +254,6 @@ void setup() {
// First serial output only here to avoid timing inconsistencies for power button press duration verification
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();
activityManager.goToBoot();
@@ -429,4 +412,4 @@ void loop() {
delay(10);
}
}
}
}