Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Fix stick calibration#22

Open
paranoidduck wants to merge 1 commit intoemilyst:mainfrom
paranoidduck:main
Open

Fix stick calibration#22
paranoidduck wants to merge 1 commit intoemilyst:mainfrom
paranoidduck:main

Conversation

@paranoidduck
Copy link
Copy Markdown

@paranoidduck paranoidduck commented Aug 9, 2024

I was experiencing issues #8 / #18 on my NSO N64 controler.
Digging in the code, I found that min/max calibration are not properly set during nx_con_read_stick_calibration().
Hence, it always returns EINVAL (because returned calibration values don't satisfy "min < center < max").

According to dekuNukem joycon reverse engineering, the min and max values read from SPI are relative to the center.

So the actual calibration values should be center-min < center < center+max.

@paranoidduck
Copy link
Copy Markdown
Author

paranoidduck commented Aug 10, 2024

Reading more carefully issue #8, I realize you had already identified the commit which introduced the regression. And that I've just reintroduced the missing lines with this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant