Rotary encoder fixes#10198
Open
80HD-0 wants to merge 4 commits intomeshtastic:developfrom
Open
Conversation
|
|
caveman99
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤝 Attestations
Note: I did not verify the other devices listed because I don't have all of them, but either way, none of them have a rotary encoder, which is the only component this PR is focused on fixing.
This PR fixes a bug with the rotary encoder where an incorrectly defined interrupt handler caused it to constantly fire button press events while the rotary encoder button was held down. By extension, this bypasses the debounce function already implemented. The debounce time was also decreased, since it was a bit long. This is probably due to someone else noticing this bug and trying to fix it by increasing the debounce.
Not only would this bug cause unwanted button presses (like an exit button in a menu reopening the menu instantly), it seemed to crash the device if it was held down longer than about a half second. With this fix, the debounce works as intended, preventing these unwanted presses and stopping the crash that would previously happen.
I have verified that on my Heltec V3, this does not break anything.