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
Core encoder/sensor refactor #1039
Core encoder/sensor refactor #1039
Changes from all commits
70e79ad
0d23337
0529949
d8ccde6
2c457f5
6296925
0a386e2
2465e3d
ecabd88
8cfbd64
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.
What is the difference between this and
ZMK_ENCODERS_DEFAULT_TRIGGERS_PER_ROTATION
? Do we need two different configs (with different defaults) that seem to be for the same thing?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 not sure I understand what this is doing. Why do we need to set the triggers per rotation both on the sensors node and on a "left" node which I don't see referenced anywhere else?
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 config here allows setting a global value, or override the setting per sensor. Needed in case, say, you have a tactile encoder with a certain number of detents per rotation, and next to it a linear encoder that you want to trigger behaviors more frequently. This gets pulled in by the sensor code and leveraged by the keymap.
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 just confused by the overriding of a "left" encoder on a thing that only has one encoder as far as I can tell.
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.
For example and testing, more than requirement. Made it easy to comment out portions locally when testing this.
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.
If I'm reading this correctly, settings
steps = 0
puts the driver into a mode where it works like it did previously and doesn't provide a position in degrees? Won't that confuse any code that's reading the sensor and expecting degrees?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.
It definitely would. The expectation is you "enable" both the new
steps
at the same time you enable the new config in the ZMK sensors node so both sets of "new code" are turned on at the same time.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.
Can we add a comment explaining that this is temporary code for backwards compatibility?
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.
Added.