Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for removal of hysteresis on 4x encoders #13698

Merged
merged 2 commits into from
Aug 17, 2021
Merged

Conversation

tucvbif
Copy link

@tucvbif tucvbif commented Jul 24, 2021

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.

Description

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added the core label Jul 24, 2021
@drashna
Copy link
Member

drashna commented Jul 24, 2021

You have a merge conflict here, and need to rebase to fix it.

@github-actions github-actions bot added keymap dependencies documentation keyboard via Adds via keymap and/or updates keyboard for via support labels Jul 25, 2021
@drashna
Copy link
Member

drashna commented Jul 26, 2021

You need to rebase to fix this.

If you need help with that, I can definitely see about helping with that.

@tucvbif
Copy link
Author

tucvbif commented Jul 26, 2021

Yes, I definitely need help.

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.
@github-actions github-actions bot removed documentation dependencies keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Jul 29, 2021
@drashna
Copy link
Member

drashna commented Jul 29, 2021

I've rebased the PR, so it should be up to date, now.

For reference, the process is outlined here:
https://docs.qmk.fm/#/newbs_git_best_practices

Which is basically what I did. However, since this looks like it was done from the web UI, I figured it was probably simplest to do it myself.

Just verify that it's correct (looks like it)

@drashna
Copy link
Member

drashna commented Jul 30, 2021

Also, could you add documentation for the option?

@drashna drashna requested a review from a team July 30, 2021 05:06
@tucvbif
Copy link
Author

tucvbif commented Aug 2, 2021

How can I do this?

@drashna
Copy link
Member

drashna commented Aug 2, 2021

Basically by editing: https://github.com/qmk/qmk_firmware/blob/develop/docs/feature_encoders.md

@tucvbif
Copy link
Author

tucvbif commented Aug 2, 2021

Also, I appreciate if someone check the grammar.

@tzarc tzarc requested a review from a team August 17, 2021 22:44
@tzarc tzarc changed the title Remove hysteresis on 4x encoders Allow for removal of hysteresis on 4x encoders Aug 17, 2021
@tzarc tzarc merged commit 703f027 into qmk:develop Aug 17, 2021
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
* 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
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants