summaryrefslogtreecommitdiff
path: root/src/system_fsm/running.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-06-16 13:14:45 +1000
committerjacqueline <me@jacqueline.id.au>2023-06-16 13:14:45 +1000
commit5b7b88420b169d1dfdeea6d082762fccefbc7d49 (patch)
treee5bc4a44088a9ac62e1628ffa3265f4819c3c979 /src/system_fsm/running.cpp
parentc6bb42cdd21b63accd20012373a8a0e41d8566f5 (diff)
downloadtangara-fw-5b7b88420b169d1dfdeea6d082762fccefbc7d49.tar.gz
Fix issues with importing my entire library
Diffstat (limited to 'src/system_fsm/running.cpp')
-rw-r--r--src/system_fsm/running.cpp4
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>(