From 684ff50ef4931aeb8cfb15c5a2d62e55520f04a5 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 21 Mar 2024 10:50:23 +1100 Subject: Add support for screens declaring that they can't be popped Needed as prep for usb msc support; you really shouldn't leave the MSC settings screen until you've disabled usb msc. --- src/ui/include/screen.hpp | 2 ++ src/ui/include/screen_lua.hpp | 2 ++ src/ui/include/screen_splash.hpp | 2 ++ 3 files changed, 6 insertions(+) (limited to 'src/ui/include') diff --git a/src/ui/include/screen.hpp b/src/ui/include/screen.hpp index 4241c712..40284fda 100644 --- a/src/ui/include/screen.hpp +++ b/src/ui/include/screen.hpp @@ -43,6 +43,8 @@ class Screen { return group_; } + virtual auto canPop() -> bool = 0; + protected: lv_obj_t* const root_; lv_obj_t* content_; diff --git a/src/ui/include/screen_lua.hpp b/src/ui/include/screen_lua.hpp index 0ed3a508..41d97a1e 100644 --- a/src/ui/include/screen_lua.hpp +++ b/src/ui/include/screen_lua.hpp @@ -21,6 +21,8 @@ class Lua : public Screen { auto onShown() -> void override; auto onHidden() -> void override; + auto canPop() -> bool override; + auto SetObjRef(lua_State*) -> void; private: diff --git a/src/ui/include/screen_splash.hpp b/src/ui/include/screen_splash.hpp index 1ee7dd89..6e746345 100644 --- a/src/ui/include/screen_splash.hpp +++ b/src/ui/include/screen_splash.hpp @@ -20,6 +20,8 @@ class Splash : public Screen { Splash(); ~Splash(); + auto canPop() -> bool override { return false; } + private: lv_obj_t* container_; lv_obj_t* label_; -- cgit v1.2.3 From dadac304dd930ddf4c5aebcc069c5d9f881b2b60 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 21 Mar 2024 11:51:48 +1100 Subject: Add very basic usb msc ui --- src/ui/include/ui_fsm.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ui/include') diff --git a/src/ui/include/ui_fsm.hpp b/src/ui/include/ui_fsm.hpp index 579cc2bb..f7fde1dd 100644 --- a/src/ui/include/ui_fsm.hpp +++ b/src/ui/include/ui_fsm.hpp @@ -132,6 +132,8 @@ class UiState : public tinyfsm::Fsm { static lua::Property sLockSwitch; static lua::Property sDatabaseUpdating; + + static lua::Property sUsbMassStorageEnabled; }; namespace states { -- cgit v1.2.3 From 175bfc4e3e9f7aa39e084d3f1625347f1d5711ec Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 25 Mar 2024 17:34:41 +1100 Subject: WIP rewrie audio pipeline+fsm guts for more reliability --- src/ui/include/ui_fsm.hpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/ui/include') diff --git a/src/ui/include/ui_fsm.hpp b/src/ui/include/ui_fsm.hpp index f7fde1dd..5e1cc487 100644 --- a/src/ui/include/ui_fsm.hpp +++ b/src/ui/include/ui_fsm.hpp @@ -57,8 +57,6 @@ class UiState : public tinyfsm::Fsm { virtual void react(const system_fsm::StorageMounted&) {} void react(const system_fsm::BatteryStateChanged&); - void react(const audio::PlaybackStarted&); - void react(const audio::PlaybackStopped&); void react(const audio::PlaybackUpdate&); void react(const audio::QueueUpdate&); -- cgit v1.2.3