From 2a568846bd8f1c9e23e86e7570557eed6f18cf9f Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 7 Jun 2023 10:30:33 +1000 Subject: Cute brightness fade to avoid ugly startup :) --- src/ui/include/ui_fsm.hpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/ui/include') diff --git a/src/ui/include/ui_fsm.hpp b/src/ui/include/ui_fsm.hpp index da6263b7..8b80f162 100644 --- a/src/ui/include/ui_fsm.hpp +++ b/src/ui/include/ui_fsm.hpp @@ -21,9 +21,7 @@ namespace ui { class UiState : public tinyfsm::Fsm { public: - static auto Init(drivers::GpioExpander* gpio_expander, - const std::weak_ptr& touchwheel, - const std::weak_ptr& display) -> void; + static auto Init(drivers::GpioExpander* gpio_expander) -> bool; virtual ~UiState() {} @@ -42,23 +40,18 @@ class UiState : public tinyfsm::Fsm { protected: static drivers::GpioExpander* sGpioExpander; - static std::weak_ptr sTouchWheel; - static std::weak_ptr sDisplay; + static std::shared_ptr sTouchWheel; + static std::shared_ptr sRelativeWheel; + static std::shared_ptr sDisplay; static std::shared_ptr sCurrentScreen; }; namespace states { -class PreBoot : public UiState { - public: - void react(const system_fsm::DisplayReady&) override; - using UiState::react; -}; - class Splash : public UiState { public: - void entry() override; + void exit() override; void react(const system_fsm::BootComplete&) override; using UiState::react; }; -- cgit v1.2.3