From 9763cc955c4f3b2c2af54b61c2c5ad77afef9603 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 26 Jun 2023 12:55:46 +1000 Subject: Improve encoder driver It actually works and clicks now! Still a bit rough though. Need to dive into lvgl internals to work out what it's doing with enc_diff --- src/ui/include/wheel_encoder.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ui/include/wheel_encoder.hpp') diff --git a/src/ui/include/wheel_encoder.hpp b/src/ui/include/wheel_encoder.hpp index d4975db9..c49e5929 100644 --- a/src/ui/include/wheel_encoder.hpp +++ b/src/ui/include/wheel_encoder.hpp @@ -8,6 +8,7 @@ #include +#include "core/lv_group.h" #include "hal/lv_hal_indev.h" #include "relative_wheel.hpp" @@ -24,6 +25,8 @@ class TouchWheelEncoder { private: lv_indev_drv_t driver_; lv_indev_t* registration_; + + lv_key_t last_key_; std::weak_ptr wheel_; }; -- cgit v1.2.3