diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-02-13 10:31:48 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-02-13 10:31:48 +1100 |
| commit | 26ae027d6721510e4b4a8107e95acc57efaaf2c6 (patch) | |
| tree | 50bec1d5581f2c8f6bb18e42013e180b266a7bca /src/ui | |
| parent | 0426d245c8d863f18babdfbaf21c8673b0746feb (diff) | |
| download | tangara-fw-26ae027d6721510e4b4a8107e95acc57efaaf2c6.tar.gz | |
Sensitivity value now between 0 and 255
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/encoder_input.cpp | 2 | ||||
| -rw-r--r-- | src/ui/include/encoder_input.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/encoder_input.cpp b/src/ui/encoder_input.cpp index 3eebe16e..3b5af2c1 100644 --- a/src/ui/encoder_input.cpp +++ b/src/ui/encoder_input.cpp @@ -275,7 +275,7 @@ auto EncoderInput::Read(lv_indev_data_t* data) -> void { auto EncoderInput::scroll_sensitivity(uint8_t val) -> void { scroll_sensitivity_ = val; - relative_wheel_->SetThreshold(scroll_sensitivity_); + relative_wheel_->SetSensitivity(scroll_sensitivity_); } auto EncoderInput::UpdateKeyState(Keys key, uint64_t ms, bool clicked) -> void { diff --git a/src/ui/include/encoder_input.hpp b/src/ui/include/encoder_input.hpp index 17e278b2..7dfac071 100644 --- a/src/ui/include/encoder_input.hpp +++ b/src/ui/include/encoder_input.hpp @@ -38,7 +38,7 @@ class EncoderInput { auto registration() -> lv_indev_t* { return registration_; } auto mode(drivers::NvsStorage::InputModes mode) { mode_ = mode; } - auto scroll_sensitivity(uint8_t val) -> void; + auto scroll_sensitivity(uint8_t val) -> void; // Value between 0-255, used to scale the threshold auto lock(bool l) -> void { is_locked_ = l; } private: |
