-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add dead zone to knobs #212
Add dead zone to knobs #212
Conversation
Awesome work @redoxcode & @gamecat69! Thanks for taking the time to dig in on this problem. Since this change is modifying current firmware behavior and affects all scripts, I want to make sure we take our time with this change. I've added a few first pass comments. I'll test this change on my EuroPi too when I get a chance. |
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.
Thanks to the submission, the root changes here look pretty good to me!
I've left some comments regarding places that I think that the API, tests, and documentation can be improved. Please let me know if any of my comments are unclear.
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.
all resolved I think
I was still dubious about the need for this change, so I checked this branch out and updated the knob line in the diagnostic script like so:
This allowed me to turn the knob and see what value would be retuned both with (L) and without (R) the change. On my hardware the difference was minimal, but noticeable. It turns out that my hardware already exhibits a noticeable deadzone. This is true on both of my modules, one that used 5% resistors, and one that used 1%. So I guess that my hardware isn't the target demographic for this change, for whatever reason. I think that code changes look good to me now, so I'm going to approve the PR. I think that before we merge this change, it would be nice to have some confirmation from someone with the root problem that this change improves their experience. We might need to tweak the default deadzone value, or make it configurable. |
I think there should be further changes to the tests after adding deadzones to read_position() as well? Or am I wrong here? |
Yeah, good call, should be very similar to the other test additions. |
Yeah, that's why I didn't mark that part as resolved yet. Just haven't had the time yet. |
No worries, take your time. There's no rush here. |
ok, think I included deadzones of 0.01 (default) and 0.0 in all the tests now. |
I've reached out to a few people for some more testing on this. Other than that the code changes look good to me, and my approval stands. We can merge as soon as we get another set of eyes on 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.
Everything looks good to me. Thanks for all your hard work and clean code with this issue!
Nice work! I can confirm this PR successfully addresses the noise issue on the knobs using the deadzone approach. However, the noise on ain also mentioned in #209 is still present. See more info on how I tested this below. I suspect the noise on ain is still present because this PR only contains the knob deadzone code (as in the title), but I didn't go any deeper into the code to confirm. Suggest the issue remains open until the ain noise is also addressed. I used the latest version of all packages and copied over the new europi.py. Previous version of europi.py: k2 min: 0.000366 ain low: 0.004055 Version of europi.py in this PR: k2 min: 0.0 ain low: 0.004078 |
Yes, this PR only addresses the issue with the Knobs. The deadzone code could be activated for ain in an other PR. |
This fixes the issue #209 by implementing deadzones for the knobs.
Please see the discussion in the issue for details.
This PR does not change:
This PR does change: