diff options
Diffstat (limited to 'src/system_fsm/running.cpp')
| -rw-r--r-- | src/system_fsm/running.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/system_fsm/running.cpp b/src/system_fsm/running.cpp index 9116ec9d..f9ff6140 100644 --- a/src/system_fsm/running.cpp +++ b/src/system_fsm/running.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ +#include "app_console.hpp" #include "freertos/projdefs.h" #include "result.hpp" @@ -28,6 +29,7 @@ void Running::entry() { vTaskDelay(pdMS_TO_TICKS(250)); auto storage_res = drivers::SdStorage::Create(sGpioExpander.get()); if (storage_res.has_error()) { + ESP_LOGW(kTag, "failed to mount!"); events::Dispatch<StorageError, SystemState, audio::AudioState, ui::UiState>( StorageError()); return; @@ -38,11 +40,13 @@ void Running::entry() { ESP_LOGI(kTag, "opening database"); auto database_res = database::Database::Open(); if (database_res.has_error()) { + ESP_LOGW(kTag, "failed to open!"); events::Dispatch<StorageError, SystemState, audio::AudioState, ui::UiState>( StorageError()); return; } sDatabase.reset(database_res.value()); + console::AppConsole::sDatabase = sDatabase; ESP_LOGI(kTag, "storage loaded okay"); events::Dispatch<StorageMounted, SystemState, audio::AudioState, ui::UiState>( |
