summaryrefslogtreecommitdiff
path: root/src/ui/include/wheel_encoder.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-30 16:48:10 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-30 16:48:10 +1000
commit320fdeb9d8355d3c361d5c6d60de8afc64501af9 (patch)
treef0d5a2ab82199c78ad6768c6b18ba1239a0b7ee4 /src/ui/include/wheel_encoder.hpp
parent4247c9fe7d25c921fbfc73fc50e849c8780e7ad6 (diff)
downloadtangara-fw-320fdeb9d8355d3c361d5c6d60de8afc64501af9.tar.gz
Use a service locator instead of passing around subsets of drivers between FSMs
Diffstat (limited to 'src/ui/include/wheel_encoder.hpp')
-rw-r--r--src/ui/include/wheel_encoder.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/include/wheel_encoder.hpp b/src/ui/include/wheel_encoder.hpp
index c49e5929..fcac5edd 100644
--- a/src/ui/include/wheel_encoder.hpp
+++ b/src/ui/include/wheel_encoder.hpp
@@ -17,7 +17,7 @@ namespace ui {
class TouchWheelEncoder {
public:
- explicit TouchWheelEncoder(std::weak_ptr<drivers::RelativeWheel> wheel);
+ explicit TouchWheelEncoder(std::unique_ptr<drivers::RelativeWheel> wheel);
auto Read(lv_indev_data_t* data) -> void;
auto registration() -> lv_indev_t* { return registration_; }
@@ -27,7 +27,7 @@ class TouchWheelEncoder {
lv_indev_t* registration_;
lv_key_t last_key_;
- std::weak_ptr<drivers::RelativeWheel> wheel_;
+ std::unique_ptr<drivers::RelativeWheel> wheel_;
};
} // namespace ui