Skip to content
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

JS Selection Slider debouncer somehow causes LS (default) and RS (pin mapping) to oscillate at debounce time #790

Closed
bsstephan opened this issue Jan 11, 2024 · 0 comments · Fixed by #793
Assignees

Comments

@bsstephan
Copy link
Contributor

so if I have default let to LS, buttons set to DP and RS, if I hold the DP button the lever always registers DP (as expected), if I hold the RS button the lever seemingly randomly oscillates between registering LS and RS (I say randomly because it's not entirely even, I think it's picking RS most of the time)
this is the same as what IA reported
if I recompile with #define JSLIDER_DEBOUNCE_MILLIS 0, no oscillation, RS button works as it should
so something in the addon's debouncer is acting strange
going to try a huge value and see what happens
yup
if I set it to 250ms, I see LS activating far less in my tester
I'm only eyeballing it, but I could believe it's 4 times a second
so something in the debouncer is momentarily setting the mode back to LS
I'm in the middle of trying another thing (and I guess figuring out why my webconfig is crashy, so two things), so I can't look at that code right now, but I would look at the bitwise operations inside if ((uNowTime - uDebTime) > JSLIDER_DEBOUNCE_MILLIS)

@NickGuyver NickGuyver self-assigned this Jan 11, 2024
@NickGuyver NickGuyver linked a pull request Jan 11, 2024 that will close this issue
bsstephan added a commit to bsstephan/GP2040-CE that referenced this issue Jan 12, 2024
I'm not going to say we *understand* why this fixes OpenStickCommunity#790, but it appears
to.
arntsonl pushed a commit that referenced this issue Jan 14, 2024
I'm not going to say we *understand* why this fixes #790, but it appears
to.
arntsonl added a commit that referenced this issue Jan 14, 2024
* use if-else block logic instead of switch in jslider debouncer (#793)

I'm not going to say we *understand* why this fixes #790, but it appears
to.

* Adds a "pin viewer" in pin mapping page (#794)

---------

Co-authored-by: Brian S. Stephan <[email protected]>
Co-authored-by: Pelsin <[email protected]>
arntsonl added a commit that referenced this issue Jan 16, 2024
* First initial draft of pin-assignment in board config

* Clean-ups to board configs

* Quick fix on gpioaction

* Pulling main into my gpio pin config branch (#797)

* use if-else block logic instead of switch in jslider debouncer (#793)

I'm not going to say we *understand* why this fixes #790, but it appears
to.

* Adds a "pin viewer" in pin mapping page (#794)

---------

Co-authored-by: Brian S. Stephan <[email protected]>
Co-authored-by: Pelsin <[email protected]>

---------

Co-authored-by: Brian S. Stephan <[email protected]>
Co-authored-by: Pelsin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants