diff options
| author | tucvbif <47757803+tucvbif@users.noreply.github.com> | 2021-08-18 02:40:00 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-18 09:40:00 +1000 |
| commit | 703f0277170c7e2d1acaa00b274f6fd479045abd (patch) | |
| tree | af753085faaf1faefaf47441046ee8c4714af9be /docs/feature_encoders.md | |
| parent | b8e913c8db73ebf890e4604ee41991a34354a600 (diff) | |
| download | qmk_firmware-703f0277170c7e2d1acaa00b274f6fd479045abd.tar.gz qmk_firmware-703f0277170c7e2d1acaa00b274f6fd479045abd.zip | |
Allow for removal of hysteresis on 4x encoders (#13698)
* Remove hysteresis on 4x encoders
Sometimes, controller skips encoder pulses and when it returns to default position, the encoder_pulses variable isn't equals 0. And when I turn encoder in opposite direciton, it skips first click becase of encoder_pulses crosses zero. To prevent this, I add the ENCODER_DEFAULT_POS constant, and reset encoder_pulses into 0 when the state variable equals ENCODER_DEFAULT_POS.
* Documentation for ENCODER_DEFAULT_POS
Diffstat (limited to 'docs/feature_encoders.md')
| -rw-r--r-- | docs/feature_encoders.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index a56f093a3..509f55b91 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md | |||
| @@ -38,6 +38,12 @@ It can also be defined per-encoder, by instead defining: | |||
| 38 | #define ENCODER_RESOLUTIONS { 4, 2 } | 38 | #define ENCODER_RESOLUTIONS { 4, 2 } |
| 39 | ``` | 39 | ``` |
| 40 | 40 | ||
| 41 | For 4× encoders you also can assign default position if encoder skips pulses when it changes direction. For example, if your encoder send high level on both pins by default, define this: | ||
| 42 | |||
| 43 | ```c | ||
| 44 | #define ENCODER_DEFAULT_POS 0x3 | ||
| 45 | ``` | ||
| 46 | |||
| 41 | ## Split Keyboards | 47 | ## Split Keyboards |
| 42 | 48 | ||
| 43 | If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this: | 49 | If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this: |
