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

Fix a potential bug in encoder_init(). #16372

Merged
merged 1 commit into from
Feb 21, 2022
Merged

Conversation

mtei
Copy link
Contributor

@mtei mtei commented Feb 16, 2022

Description

After executing setPinInputHigh(pin), it is necessary to wait for the charging time to read from the corresponding pin. This is the same as requiring matrix_output_unselect_delay() after doing unselect_row() in matrix.c.

In #15311

Currently, it causes the encoder update function to be spammed

This phenomenon can be expected to be resolved by this PR.

Types of Changes

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

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).

After executing `setPinInputHigh(pin)`, it is necessary to wait for the charging time to read from the corresponding pin. This is the same as requiring `matrix_output_unselect_delay()` after doing `unselect_row()` in matrix.c.
@mtei mtei requested a review from a team February 16, 2022 10:30
@github-actions github-actions bot added the core label Feb 16, 2022
@mtei mtei mentioned this pull request Feb 16, 2022
14 tasks
@tzarc tzarc added the bug label Feb 16, 2022
@monksoffunk
Copy link
Contributor

I never experienced such problems.
@drashna which keyboard did it happen on?

anyway, I confirmed that I could build Cassette42 default firmware with this PR.

@drashna
Copy link
Member

drashna commented Feb 17, 2022

I never experienced such problems. @drashna which keyboard did it happen on?

anyway, I confirmed that I could build Cassette42 default firmware with this PR.

With the current code, I don't experience it.

However, with the asym encoder PRs, I do. However, this change doesn't appear to cause any issues, and if it's closer to expected/proper behavior, 👍🏻

@mtei mtei merged commit b1de11c into qmk:master Feb 21, 2022
@mtei mtei deleted the fix_encoder_init branch April 22, 2022 12:58
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.

None yet

4 participants