comments cleanup and debounce comments#1
Open
mattvenn wants to merge 2 commits into
Open
Conversation
Member
|
FWIW, I'm holding off on merging anything until the Keyboardio Model
01's firmware is tagged.
Thank you!
…On Fri, Jun 16, 2017 at 12:56:33AM -0700, matt venn wrote:
The only code change I made was this:
changes = delta & ~debouncer->db0 & ~debouncer->db1;
Instead of:
changes = ~(~delta | (debouncer->db0) | (debouncer->db1));
Which are equivalent, but the first makes more intuitive sense: only
change when delta is true and the counter is wrapped back to 0.
--------------------------------------------------------------------------
You can view, comment on, or merge this pull request online at:
  [1]#1
Commit Summary
*Â comments
*Â explanatory comments and imroved readability of code
File Changes
*Â M [2]firmware/debounce.h (37)
*Â M [3]firmware/keyscanner.c (19)
Patch Links:
*Â [4]https://github.com/keyboardio/avr_keyscanner/pull/1.patch
*Â [5]https://github.com/keyboardio/avr_keyscanner/pull/1.diff
�
You are receiving this because you are subscribed to this thread.
Reply to this email directly, [6]view it on GitHub, or [7]mute the thread.
Reverse link: [8]unknown
References
Visible links
1. #1
2. https://github.com/keyboardio/avr_keyscanner/pull/1/files#diff-0
3. https://github.com/keyboardio/avr_keyscanner/pull/1/files#diff-1
4. https://github.com/keyboardio/avr_keyscanner/pull/1.patch
5. https://github.com/keyboardio/avr_keyscanner/pull/1.diff
6. #1
7. https://github.com/notifications/unsubscribe-auth/AACxaP7Wg6rGjYFjq6Ox6vnNv9ZPTT45ks5sEjUxgaJpZM4N8JHy
8. #1
--
|
algernon
approved these changes
Nov 24, 2017
algernon
left a comment
There was a problem hiding this comment.
I'm not sure how I could test this on the hardware, but the changes look good, and the new comments help a lot in understanding the code.
As the Model01 firmware has been tagged, I believe this could go in now.
Member
|
@algernon - Can you split this out to two separate things: comments and code refactoring? The comments should be good to go in immediately. The code refactoring, we'd want to test more carefully. |
This was referenced Nov 26, 2017
Merged
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.
The only code change I made was this:
changes = delta & ~debouncer->db0 & ~debouncer->db1;
Instead of:
changes = ~(~delta | (debouncer->db0) | (debouncer->db1));
Which are equivalent, but the first makes more intuitive sense: only change when delta is true and the counter is wrapped back to 0.