diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-10-03 10:37:29 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-10-03 10:37:29 +1100 |
| commit | 7d5536e2abca61f503ed68521603bd30700a7e5e (patch) | |
| tree | fc8b191a5d248a86de08a00d814359f335423e95 /src/ui/include/lvgl_task.hpp | |
| parent | f2bad894cdac88b94a358cebdb062f426b191d1b (diff) | |
| download | tangara-fw-7d5536e2abca61f503ed68521603bd30700a7e5e.tar.gz | |
Generalise the lvgl input driver in preparation for more input methods
Diffstat (limited to 'src/ui/include/lvgl_task.hpp')
| -rw-r--r-- | src/ui/include/lvgl_task.hpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ui/include/lvgl_task.hpp b/src/ui/include/lvgl_task.hpp index 4362249b..f212ab9d 100644 --- a/src/ui/include/lvgl_task.hpp +++ b/src/ui/include/lvgl_task.hpp @@ -15,30 +15,27 @@ #include "freertos/timers.h" #include "display.hpp" +#include "encoder_input.hpp" #include "relative_wheel.hpp" #include "screen.hpp" #include "themes.hpp" #include "touchwheel.hpp" -#include "wheel_encoder.hpp" namespace ui { class UiTask { public: static auto Start() -> UiTask*; - ~UiTask(); - // FIXME: Once we have more input devices, this function should accept a more - // generic interface. - auto SetInputDevice(std::shared_ptr<TouchWheelEncoder> dev) -> void; + auto input(std::shared_ptr<EncoderInput> input) -> void; private: UiTask(); auto Main() -> void; - std::shared_ptr<TouchWheelEncoder> input_device_; + std::shared_ptr<EncoderInput> input_; std::shared_ptr<Screen> current_screen_; }; |
