diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-25 16:59:39 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-25 16:59:39 +1000 |
| commit | 0f5cf25e73fb2e789b472317966ff80323dddd75 (patch) | |
| tree | 714bce08328a8cc86e1cb97a1c60fb0a267ff49d /src/drivers/include | |
| parent | 485e9adfce01b9b4e21dae927fb3b7ed3d5fc83d (diff) | |
| download | tangara-fw-0f5cf25e73fb2e789b472317966ff80323dddd75.tar.gz | |
More performance and usability tweaks
- pin ui and decoder to opposite cores
- disable touch wheel when controls are locked
Diffstat (limited to 'src/drivers/include')
| -rw-r--r-- | src/drivers/include/relative_wheel.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/drivers/include/relative_wheel.hpp b/src/drivers/include/relative_wheel.hpp index 6edc006a..5e801aba 100644 --- a/src/drivers/include/relative_wheel.hpp +++ b/src/drivers/include/relative_wheel.hpp @@ -26,17 +26,21 @@ class RelativeWheel { explicit RelativeWheel(TouchWheel* touch); - // Not copyable or movable. - RelativeWheel(const RelativeWheel&) = delete; - RelativeWheel& operator=(const RelativeWheel&) = delete; - auto Update() -> void; + auto SetEnabled(bool) -> void; auto is_clicking() -> bool; auto ticks() -> std::int_fast16_t; + // Not copyable or movable. + RelativeWheel(const RelativeWheel&) = delete; + RelativeWheel& operator=(const RelativeWheel&) = delete; + private: TouchWheel* touch_; + + bool is_enabled_; + bool is_clicking_; bool was_clicking_; bool is_first_read_; |
