From 26ae027d6721510e4b4a8107e95acc57efaaf2c6 Mon Sep 17 00:00:00 2001 From: ailurux Date: Tue, 13 Feb 2024 10:31:48 +1100 Subject: Sensitivity value now between 0 and 255 --- src/drivers/include/relative_wheel.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/drivers/include') diff --git a/src/drivers/include/relative_wheel.hpp b/src/drivers/include/relative_wheel.hpp index a44e3598..e1106143 100644 --- a/src/drivers/include/relative_wheel.hpp +++ b/src/drivers/include/relative_wheel.hpp @@ -25,8 +25,8 @@ class RelativeWheel { auto Update() -> void; auto SetEnabled(bool) -> void; - auto SetThreshold(int) -> void; - auto GetThreshold() -> int; + auto SetSensitivity(uint8_t) -> void; + auto GetSensitivity() -> uint8_t; auto is_clicking() const -> bool; auto ticks() const -> std::int_fast16_t; @@ -39,7 +39,8 @@ class RelativeWheel { TouchWheel& touch_; bool is_enabled_; - int threshold_; + uint8_t sensitivity_; + uint8_t threshold_; bool is_clicking_; bool was_clicking_; -- cgit v1.2.3