Skip to content

Refactor debounce logic to use with_timeout#5

Open
mbrieske wants to merge 2 commits into
CBJamo:mainfrom
swobbee-dev:main
Open

Refactor debounce logic to use with_timeout#5
mbrieske wants to merge 2 commits into
CBJamo:mainfrom
swobbee-dev:main

Conversation

@mbrieske

Copy link
Copy Markdown

I like the general idea and want to use it for my project, however the original implementation doesn't reset the debounce timer when bouncing is detected.
After detecting an edge, it would wait for a fixed duration and then check the final state. If bouncing occurred during this period, the timer wouldn't restart.

I replaced the fixed timers with timeout-based monitoring that restarts the debounce period whenever bouncing is detected.

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.

1 participant