-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fix rotary encoder handling - resurrection of #730 #4202
Fix rotary encoder handling - resurrection of #730 #4202
Conversation
Original fix from @nickbrennan01 This feature supports half-stepping rotary encoders and encoders with inverted inputs (like Velleman K8800). Requires an additional config entry in [display] section: encoder_steps_per_detent: 2|4 encoder_steps_per_detent = 2: "regular" encoder encoder_steps_per_detent = 4: half-stepping encoder
Signed-off-by: Jelle Victoor <victoor.jelle@gmail.com>
Signed-off-by: Jelle Victoor <victoor.jelle@gmail.com>
Signed-off-by: Jelle Victoor <victoor.jelle@gmail.com>
updated with documentation |
We set the default to full step to stay compatible with the old behaviour. Signed-off-by: susisstrolch <susiconstrolch@gmail.com>
Thanks - some high-level comments:
@mcmatrix - do you have any comments on this? -Kevin |
The white spacee changes were accidental - I've removed them. |
I'm not sure what the state of this PR is. Is there still interest in it? -Kevin |
I am interested in it, and I feel like it could be a great addition to klipper/3d printing as a whole, but I dont know if there are others that are also interested or if its just me, or if that comment was referenced to just the author... |
I suspect this feature will need a developer to lead it to completion. Otherwise, I don't see it getting merged without a conclusion on the review comments and fixing the build failures. -Kevin |
Signed-off-by: Jelle Victoor <victoor.jelle@gmail.com>
Signed-off-by: Jelle Victoor <victoor.jelle@gmail.com>
Hi @KevinOConnor |
Sorry, but when I look at the diff I still see the items I mentioned at #4202 (comment) . There are still unrelated white space changes. Also, I find the new state machine to be quite confusing (the new code seems to be mixing two different devices into one state machine). -Kevin |
Based on the comments of susisstrolch i thought the whitespaces were ok, I'll revisit |
I find it confusing to modify ENCODER_STATES; I would make an entirely new ENCODER_STATES_FOR_1_DETENT (or similar) and not modify the existing state machine. Alas, due to time constraints on my time, this isn't something I can spend further time on. -Kevin |
It looks like this GitHub Pull Request has become inactive. If there are any further updates, you can add a comment here or open a new ticket. Best regards, PS: I'm just an automated script, not a human being. |
Adds support for half-stepping encoders (encoders that only emit two steps per detent, instead of four). Incorporates the feedback from @susisstrolch's PR: Klipper3d#4202 , which was itself built upon a previous PR from @nickbrennan01: Klipper3d#730 Uses the table from the Rotary Arduino library linked in buttons.py: https://github.com/brianlow/Rotary/blob/6b784cca67c5f1ce5e11d757a540fc4c0311efca/Rotary.cpp#L21-L40 Signed-off-by: Rufo Sanchez <rufo@rufosanchez.com>
Adds support for half-stepping encoders (encoders that only emit two steps per detent, instead of four). Incorporates the feedback from @susisstrolch's PR: Klipper3d#4202 , which was itself built upon a previous PR from @nickbrennan01: Klipper3d#730 Uses the table from the Rotary Arduino library linked in buttons.py: https://github.com/brianlow/Rotary/blob/6b784cca67c5f1ce5e11d757a540fc4c0311efca/Rotary.cpp#L21-L40 Signed-off-by: Rufo Sanchez <rufo@rufosanchez.com>
Adds support for half-stepping encoders (encoders that only emit two steps per detent, instead of four). Incorporates the feedback from @susisstrolch's PR: Klipper3d#4202 , which was itself built upon a previous PR from @nickbrennan01: Klipper3d#730 Uses the table from the Rotary Arduino library linked in buttons.py: https://github.com/brianlow/Rotary/blob/6b784cca67c5f1ce5e11d757a540fc4c0311efca/Rotary.cpp#L21-L40 Signed-off-by: Rufo Sanchez <rufo@rufosanchez.com>
Adds support for half-stepping encoders (encoders that only emit two steps per detent, instead of four). Incorporates the feedback from @susisstrolch's PR: #4202 , which was itself built upon a previous PR from @nickbrennan01: #730 Uses the table from the Rotary Arduino library linked in buttons.py: https://github.com/brianlow/Rotary/blob/6b784cca67c5f1ce5e11d757a540fc4c0311efca/Rotary.cpp#L21-L40 Signed-off-by: Rufo Sanchez <rufo@rufosanchez.com>
Adds support for half-stepping encoders (encoders that only emit two steps per detent, instead of four). Incorporates the feedback from @susisstrolch's PR: Klipper3d#4202 , which was itself built upon a previous PR from @nickbrennan01: Klipper3d#730 Uses the table from the Rotary Arduino library linked in buttons.py: https://github.com/brianlow/Rotary/blob/6b784cca67c5f1ce5e11d757a540fc4c0311efca/Rotary.cpp#L21-L40 Signed-off-by: Rufo Sanchez <rufo@rufosanchez.com>
Original fix from @nickbrennan01
This feature supports half-stepping rotary encoders and encoders with inverted
inputs (like Velleman K8800).
Requires an additional config entry in [display] section:
encoder_steps_per_detent: 2|4
encoder_steps_per_detent = 2: "regular" encoder
encoder_steps_per_detent = 4: half-stepping encoder
Signed-off-by: Juergen Orschiedt juorschiedt@gmail.com