From 5c04e2ad8d14616ce3ca09b658d25bab3d8d2460 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 4 Oct 2023 10:18:31 +1100 Subject: Neaten up the various kinds of inputs, and move volumes to The New Way --- src/audio/include/audio_events.hpp | 2 ++ src/audio/include/audio_fsm.hpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/audio/include') diff --git a/src/audio/include/audio_events.hpp b/src/audio/include/audio_events.hpp index 6b986462..b130938c 100644 --- a/src/audio/include/audio_events.hpp +++ b/src/audio/include/audio_events.hpp @@ -34,6 +34,8 @@ struct PlayFile : tinyfsm::Event { std::pmr::string filename; }; +struct StepUpVolume : tinyfsm::Event {}; +struct StepDownVolume : tinyfsm::Event {}; struct VolumeChanged : tinyfsm::Event {}; struct ChangeMaxVolume : tinyfsm::Event { uint16_t new_max; diff --git a/src/audio/include/audio_fsm.hpp b/src/audio/include/audio_fsm.hpp index 1c0b8aaa..256e1430 100644 --- a/src/audio/include/audio_fsm.hpp +++ b/src/audio/include/audio_fsm.hpp @@ -41,8 +41,8 @@ class AudioState : public tinyfsm::Fsm { /* Fallback event handler. Does nothing. */ void react(const tinyfsm::Event& ev) {} - void react(const system_fsm::KeyUpChanged&); - void react(const system_fsm::KeyDownChanged&); + void react(const StepUpVolume&); + void react(const StepDownVolume&); void react(const system_fsm::HasPhonesChanged&); void react(const ChangeMaxVolume&); void react(const OutputModeChanged&); -- cgit v1.2.3