Skip to content

Fix IncrementalEncoder overflow on ESP32 #9459

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

Closed
wants to merge 2 commits into from
Closed

Fix IncrementalEncoder overflow on ESP32 #9459

wants to merge 2 commits into from

Conversation

vickash
Copy link

@vickash vickash commented Jul 25, 2024

While using a rotary encoder with ESP32-S3, I noticed both the high and low limits were returning to 0 on overflow, which is the default behavior of the ESP32 PCNT when the internal accumulator is disabled.

unit_config.flags.accum_count = true; is set in the code, but watchpoints matching the high and low limits also need to be created for the internal accumulator to work.

This PR should fix that.

@dhalbert dhalbert changed the base branch from main to 9.1.x July 25, 2024 13:55
@dhalbert dhalbert changed the base branch from 9.1.x to main July 25, 2024 13:55
@dhalbert
Copy link
Collaborator

dhalbert commented Jul 25, 2024

Thanks for the PR. If you resubmit it to be against 9.1.x instead of main, we can get it into a bugfix release for 9.1.x. Are you able to do that? You'll probably need to cherry-pick your commits into a branch based on 9.1.x to avoid main commits leaking in.

@vickash
Copy link
Author

vickash commented Jul 25, 2024

Will do shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants