summaryrefslogtreecommitdiff
path: root/src/system_fsm/booting.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-01 12:13:48 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-01 12:13:48 +1000
commit955a8ce303a9f8fd6a34009934e3d7aaeff3ec17 (patch)
tree18d5783a5c7be0a3e08e6ff0ea595432bc380761 /src/system_fsm/booting.cpp
parentd41de537a0e31e1c5ad18b5024c781f6e4a07bbb (diff)
downloadtangara-fw-955a8ce303a9f8fd6a34009934e3d7aaeff3ec17.tar.gz
Basic nvs init + bluetooth in the build
Diffstat (limited to 'src/system_fsm/booting.cpp')
-rw-r--r--src/system_fsm/booting.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/system_fsm/booting.cpp b/src/system_fsm/booting.cpp
index 4686748e..3d6c6a46 100644
--- a/src/system_fsm/booting.cpp
+++ b/src/system_fsm/booting.cpp
@@ -13,6 +13,7 @@
#include "event_queue.hpp"
#include "gpios.hpp"
#include "lvgl/lvgl.h"
+#include "nvs.hpp"
#include "relative_wheel.hpp"
#include "spi.hpp"
#include "system_events.hpp"
@@ -50,9 +51,10 @@ auto Booting::entry() -> void {
ESP_LOGI(kTag, "installing remaining drivers");
sSamd.reset(drivers::Samd::Create());
sBattery.reset(drivers::Battery::Create());
+ sNvs.reset(drivers::NvsStorage::Open());
sTagParser.reset(new database::TagParserImpl());
- if (!sSamd || !sBattery) {
+ if (!sSamd || !sBattery || !sNvs) {
events::System().Dispatch(FatalError{});
events::Ui().Dispatch(FatalError{});
return;