Skip to content

Commit 087361a

Browse files
committed
fix(display): init screen after fs could be a good idea
1 parent 589f363 commit 087361a

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/main.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,16 @@ void setup() {
8787
Serial.println("");
8888
Logger::info(("GeekMagic Open Firmware " + String(PROJECT_VER_STR)).c_str());
8989

90-
DisplayManager::begin();
91-
9290
constexpr int TOTAL_STEPS = 6;
9391
int step = 0;
9492

9593
if (!LittleFS.begin()) {
96-
DisplayManager::drawLoadingBar((float)step / TOTAL_STEPS, LOADING_BAR_Y);
9794
Logger::error("Failed to mount LittleFS");
9895
return;
9996
}
10097

10198
step++;
10299

103-
SecureStorage::setSalt(KV_SALT);
104-
105100
if (configManager.secure.begin()) {
106101
Logger::info("SecureStorage initialized successfully", "ConfigManager");
107102
}
@@ -111,6 +106,15 @@ void setup() {
111106
if (configManager.load()) {
112107
Logger::info("Configuration loaded successfully");
113108
}
109+
110+
DisplayManager::begin();
111+
112+
DisplayManager::drawLoadingBar((float)step / TOTAL_STEPS, LOADING_BAR_Y);
113+
114+
step++;
115+
116+
SecureStorage::setSalt(KV_SALT);
117+
114118
step++;
115119

116120
DisplayManager::drawTextWrapped(LOADING_BAR_TEXT_X, LOADING_BAR_TEXT_Y, "Starting...", 2, LCD_WHITE, LCD_BLACK,

0 commit comments

Comments
 (0)