summaryrefslogtreecommitdiff
path: root/src/system_fsm/booting.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-08 20:25:42 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-08 20:25:42 +1000
commite1181fbe59a835ea9c93d6e067e9757e8c522d3c (patch)
tree2fd61bb93713de8c2205b7b6d0a8c84c49832e93 /src/system_fsm/booting.cpp
parentc3f40a8cc37114365ef3ec6f2888df64e5206b39 (diff)
parent592f231627843bc44ebaaa4506aec26da1f56499 (diff)
downloadtangara-fw-e1181fbe59a835ea9c93d6e067e9757e8c522d3c.tar.gz
Merge branch 'main' into opus
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;