From 65833649f4779754e90760c1f0fc81ed220c84d0 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 24 May 2023 13:30:05 +1000 Subject: Add some placeholder splash and menu screens Includes a bunch of misc display fixes. Most significantly, our lvgl tickers was busted. --- src/ui/ui_fsm.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ui/ui_fsm.cpp') diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp index a9d130ed..b08722aa 100644 --- a/src/ui/ui_fsm.cpp +++ b/src/ui/ui_fsm.cpp @@ -7,6 +7,9 @@ #include "ui_fsm.hpp" #include "display.hpp" #include "lvgl_task.hpp" +#include "screen.hpp" +#include "screen_menu.hpp" +#include "screen_splash.hpp" #include "system_events.hpp" #include "touchwheel.hpp" @@ -17,6 +20,8 @@ std::weak_ptr UiState::sTouchWheel; std::weak_ptr UiState::sDisplay; std::weak_ptr UiState::sDatabase; +std::shared_ptr UiState::sCurrentScreen; + auto UiState::Init(drivers::GpioExpander* gpio_expander, std::weak_ptr touchwheel, std::weak_ptr display, @@ -33,10 +38,18 @@ void PreBoot::react(const system_fsm::DisplayReady& ev) { transit([&]() { StartLvgl(sTouchWheel, sDisplay); }); } +void Splash::entry() { + sCurrentScreen.reset(new screens::Splash()); +} + void Splash::react(const system_fsm::BootComplete& ev) { transit(); } +void Interactive::entry() { + // sCurrentScreen.reset(new screens::Menu()); +} + } // namespace states } // namespace ui -- cgit v1.2.3