summaryrefslogtreecommitdiff
path: root/src/tangara/input/input_touch_wheel.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tangara/input/input_touch_wheel.hpp')
-rw-r--r--src/tangara/input/input_touch_wheel.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tangara/input/input_touch_wheel.hpp b/src/tangara/input/input_touch_wheel.hpp
index 982f89f4..420454b8 100644
--- a/src/tangara/input/input_touch_wheel.hpp
+++ b/src/tangara/input/input_touch_wheel.hpp
@@ -30,12 +30,14 @@ class TouchWheel : public IInputDevice {
auto name() -> std::string override;
auto triggers() -> std::vector<std::reference_wrapper<TriggerHooks>> override;
- auto onLock() -> void override;
+ auto onLock(drivers::NvsStorage::LockedInputModes) -> void override;
auto onUnlock() -> void override;
auto sensitivity() -> lua::Property&;
private:
+ const int64_t SCROLL_TIMEOUT_US = 250000; // 250ms
+
auto calculateTicks(const drivers::TouchWheelData& data) -> int8_t;
auto calculateThreshold(uint8_t sensitivity) -> uint8_t;
@@ -55,6 +57,7 @@ class TouchWheel : public IInputDevice {
uint8_t threshold_;
bool is_first_read_;
uint8_t last_angle_;
+ int64_t last_wheel_touch_time_;
};
} // namespace input