diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-01-09 15:06:14 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-01-09 15:06:14 +1100 |
| commit | 44fdf696747a2df5b9cbb68865025ecd73004cca (patch) | |
| tree | 7cdcf1754255eb553274e00b543bef96ee52681e /src/drivers | |
| parent | 09eacb71f0740dba94345ce452d7c4a2c9cdd47f (diff) | |
| download | tangara-fw-44fdf696747a2df5b9cbb68865025ecd73004cca.tar.gz | |
tweak wheel sensitivity, improve AKS for centre button
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/relative_wheel.cpp | 2 | ||||
| -rw-r--r-- | src/drivers/touchwheel.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/relative_wheel.cpp b/src/drivers/relative_wheel.cpp index b944b47b..2b8c9b20 100644 --- a/src/drivers/relative_wheel.cpp +++ b/src/drivers/relative_wheel.cpp @@ -47,7 +47,7 @@ auto RelativeWheel::Update() -> void { int delta = 128 - last_angle_; uint8_t rotated_angle = new_angle + delta; - int threshold = 15; + int threshold = 10; if (rotated_angle < 128 - threshold) { ticks_ = 1; diff --git a/src/drivers/touchwheel.cpp b/src/drivers/touchwheel.cpp index 33853e50..3c6bdb97 100644 --- a/src/drivers/touchwheel.cpp +++ b/src/drivers/touchwheel.cpp @@ -49,8 +49,8 @@ TouchWheel::TouchWheel() { WriteRegister(Register::KEY_CONTROL_BASE + 0, 0b100); WriteRegister(Register::KEY_CONTROL_BASE + 1, 0b100); WriteRegister(Register::KEY_CONTROL_BASE + 2, 0b100); - // Centre button. Also channel 1. - WriteRegister(Register::KEY_CONTROL_BASE + 3, 0b100); + // Centre button. No AKS channel, since we handle it in software. + WriteRegister(Register::KEY_CONTROL_BASE + 3, 0b0); // Touch guard. Set as a guard, in channel 1. WriteRegister(Register::KEY_CONTROL_BASE + 4, 0b10100); @@ -58,6 +58,8 @@ TouchWheel::TouchWheel() { // so that the user's finger isn't calibrated away. WriteRegister(Register::RECALIBRATION_DELAY, 0); + WriteRegister(Register::CHARGE_TIME, 0x10); + // Unused extra keys. All disabled. for (int i = 5; i < 12; i++) { WriteRegister(Register::KEY_CONTROL_BASE + i, 1); |
