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.
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
Minor carry timeout, formula letters, fixes and doc nitpicks #10
base: maccel-dev
Are you sure you want to change the base?
Minor carry timeout, formula letters, fixes and doc nitpicks #10
Changes from 7 commits
39c6a97
51f1691
6f56b7b
b8662f3
ec76f8b
9f9693b
e8c6d29
1d285de
0817331
e164bc3
426ba61
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Why increase the timeout by 100 ms?
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.
The 200ms, inherited from the get-cpi timeout when i split the two timeouts separate, is a device-specific value while the 300ms is a human factor.
The 300ms was like that in my original code and forgot to reason about when i cherry-picked it, had even tested higher values with no unpleasant behavior, while reducing it, it had.
Ie, when moving really slow, it's pretty common to see consecutive 0s as input for more than 200ms, either because of hw's internal buffering or because the standard bkb-mouse casing doetn't have ball-bearings but a ring ones, so there is a minor friction pinning the track-ball momentarily. Any such reset would be unwanted because the hand was still moving.
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.
I'm good with 300. Makes sense if you've observed 200ms being exceeded in tests. Might depend on mouse throttling as well I guess, so going to 300 to be safe makes sense. Though it would make sense for the CPI call timeout to be 300 then as well.
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.
Quote @Wimads:
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.
Still it saves x1 conditional in the significant branch, so will keep it.
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.
I don't see the point of this change. Doing it inside the early exit resets the carry sooner, but since it isn't used until a report passes the early exit check, it makes no difference.
Additionally, double assignments in one line do not fit qmk style.
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.
I does save a conditional on non-zero reports, which it the code path we care to optimize.
Sure i can change the double assignments, but i always knew that "chained" assignments are the recommended practice when the variables are related, as it is here (x & y coordinates) because they avoids a source of errors: assigning, no?
clang-format
?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.
Quote @Wimads:
I disagree with Wimads here: These were specifically intended as feedback while using the step keys, so you can turn all the spammy outputs off by not defining
MACCEL_DEBUG
, yet still receive non-spammy feedback for the step keys.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.
Ahh makes sense. I think I wondered this before and concluded the same, but forgot :P
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.
Ok, will skip the commit
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.
Quote @Wimads:
Agreed, it's a good change, but for legibility, please place the text before the code block.
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.
Do you mean not to be included in the user's config file?
My purpose was exactly that. for the user to view in his/her file the instructions to enable logging.
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.
That is a good point! Placing it in the code block encourages the user to place these instructions in their config, for easy context later down the road.
I'm convinced.
@Wimads?
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.
hm, I guess that makes some kind of sense. But it also feels weird to have the readme explain one part in the text, and then have the rest of the explanation in the code block :P But do as you see fit, no strong opinion from my side.
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.
Quote @Wimads:
Agreed, this is not neccessary at realistic DPI ranges.
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.
ok, will drop it.