summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-07-28 15:25:31 +1000
committerjacqueline <me@jacqueline.id.au>2023-07-28 15:25:31 +1000
commit9d33c33c8d669b787acd74bd5b9c7ff4c09338db (patch)
tree7bbb7d4025503224f793635ce74dd7c20342c314 /src
parent10120f9a92aa84f8b5d17a7e84e767a7aa0b42e7 (diff)
downloadtangara-fw-9d33c33c8d669b787acd74bd5b9c7ff4c09338db.tar.gz
Lock button does that same thing always
Diffstat (limited to 'src')
-rw-r--r--src/ui/include/ui_fsm.hpp3
-rw-r--r--src/ui/ui_fsm.cpp8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/include/ui_fsm.hpp b/src/ui/include/ui_fsm.hpp
index 20e5beb1..bb8ecd0a 100644
--- a/src/ui/include/ui_fsm.hpp
+++ b/src/ui/include/ui_fsm.hpp
@@ -44,7 +44,7 @@ class UiState : public tinyfsm::Fsm<UiState> {
virtual void react(const audio::PlaybackUpdate&) {}
virtual void react(const audio::QueueUpdate&) {}
- virtual void react(const system_fsm::KeyLockChanged&) {}
+ virtual void react(const system_fsm::KeyLockChanged&);
virtual void react(const internal::RecordSelected&) {}
virtual void react(const internal::IndexSelected&) {}
@@ -86,7 +86,6 @@ class Browse : public UiState {
void react(const internal::IndexSelected&) override;
void react(const internal::BackPressed&) override;
- void react(const system_fsm::KeyLockChanged&) override;
void react(const system_fsm::StorageMounted&) override;
using UiState::react;
};
diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp
index a9c3b61c..30b0be0c 100644
--- a/src/ui/ui_fsm.cpp
+++ b/src/ui/ui_fsm.cpp
@@ -84,6 +84,10 @@ void UiState::PopScreen() {
sScreens.pop();
}
+void UiState::react(const system_fsm::KeyLockChanged& ev) {
+ sDisplay->SetDisplayOn(ev.falling);
+}
+
namespace states {
void Splash::exit() {
@@ -98,10 +102,6 @@ void Splash::react(const system_fsm::BootComplete& ev) {
void Browse::entry() {}
-void Browse::react(const system_fsm::KeyLockChanged& ev) {
- sDisplay->SetDisplayOn(ev.falling);
-}
-
void Browse::react(const system_fsm::StorageMounted& ev) {
sDb = ev.db;
auto db = ev.db.lock();