summaryrefslogtreecommitdiff
path: root/src/system_fsm/running.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/system_fsm/running.cpp')
-rw-r--r--src/system_fsm/running.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/system_fsm/running.cpp b/src/system_fsm/running.cpp
index 1822a071..a46cb8dc 100644
--- a/src/system_fsm/running.cpp
+++ b/src/system_fsm/running.cpp
@@ -5,6 +5,7 @@
*/
#include "app_console.hpp"
+#include "file_gatherer.hpp"
#include "freertos/projdefs.h"
#include "result.hpp"
@@ -20,6 +21,8 @@ namespace states {
static const char kTag[] = "RUN";
+static database::IFileGatherer* sFileGatherer;
+
/*
* Ensure the storage and database are both available. If either of these fails
* to open, then we assume it's an issue with the underlying SD card.
@@ -38,7 +41,8 @@ void Running::entry() {
vTaskDelay(pdMS_TO_TICKS(250));
ESP_LOGI(kTag, "opening database");
- auto database_res = database::Database::Open();
+ sFileGatherer = new database::FileGathererImpl();
+ auto database_res = database::Database::Open(sFileGatherer, sTagParser.get());
if (database_res.has_error()) {
ESP_LOGW(kTag, "failed to open!");
events::Dispatch<StorageError, SystemState, audio::AudioState, ui::UiState>(