-
Notifications
You must be signed in to change notification settings - Fork 323
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
Turbo updates #863
Merged
arntsonl
merged 16 commits into
OpenStickCommunity:main
from
FeralAI:bugfix/20240223_turbo_updates
Feb 27, 2024
Merged
Turbo updates #863
arntsonl
merged 16 commits into
OpenStickCommunity:main
from
FeralAI:bugfix/20240223_turbo_updates
Feb 27, 2024
Conversation
This file contains 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
a couple classes had their own debouncer or reference to the gamepad debouncer. this seemed inefficient and caused potential for incongruent behavior, thinking that instead we should just debounce the GPIO pins (for buttons). this does that. this doesn't yet clean up all the code (specifically the old debouncer) but it does get everything on the new debouncer. things appear to work as before, maybe they solve some debouncing problems for folks, work to be done
this fixes boot time shortcuts that were broken by my refactor
the previous debouncer logic would try to only wait for the debounceDelay on button depresses, IIRC in an attempt to get the real button press immediately, but the more I look at it, the more I come to the same conclusion as Feral that such logic is flawed, and will register flapping switches because it's eagerly not debouncing them. with this change, button presses only register if it's been debounceDelay (default 5ms) since the last change. buttons will still register immediately as long as the delay has been met, so in practice this may only affect a latency tester and some kind of superhuman who mashes buttons at sub-5ms speeds. this applies Feral's logic (from the button debouncer) to the refactored pin debouncer. Co-authored-by: FeralAI <[email protected]>
arntsonl
approved these changes
Feb 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!
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.
This PR addresses several minor issues with the turbo addon. It integrates #857 as well for better consitency in turbo toggle and activations. Includes: