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

The alpha angle only works with a magic multiplier #6

Open
tomayac opened this issue Sep 21, 2022 · 2 comments
Open

The alpha angle only works with a magic multiplier #6

tomayac opened this issue Sep 21, 2022 · 2 comments

Comments

@tomayac
Copy link
Owner

tomayac commented Sep 21, 2022

joy-con-webhid/src/parse.js

Lines 118 to 128 in 6ebaccf

alpha:
// ToDo: I could only get this to work with a magic multiplier (430).
productId === 0x2006
? (
(((-1 * (lastValues[productId].alpha * 180)) / Math.PI) * 430) %
90
).toFixed(6)
: (
(((lastValues[productId].alpha * 180) / Math.PI) * 430) %
360
).toFixed(6),

@KevinvBre
Copy link

KevinvBre commented Sep 28, 2023

Just curious, is this the reason why alpha gets registered but also slowly counts back down to 0?
And thus also the reason why the blue JoyCon in the demo turns back up to stand 'straight'?

EDIT: that was not related.
I changed :
parse.js line 63 'const zeroBias = 0;' to fix my issuee.

PS First comment. Love this project.

@tomayac
Copy link
Owner Author

tomayac commented Sep 29, 2023

This sounds more like a drift in your Joy-Cons. Maybe try recalibrating and a firmware update as per the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants