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

Auto-detect devices based on their LED status #29

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

gal20
Copy link
Contributor

@gal20 gal20 commented Jan 8, 2021

Thanks to DanielOgorchock/joycond#49, we can now use the LED status of each device to automatically assign all slots.
This PR introduces several changes:

  • The devices are processed in order based on their player index, so player 1 will be assigned a slot first, then player 2, etc.
  • Both Joy-Cons in a combined pair are assigned automatically, right Joy-Con first. There is an added option to select only the left or only the right Joy-Con.

I tried my best to handle various edge cases, like a single Joy-Con in a combined device disconnecting and then reconnecting.
I haven't tested it yet with two combined devices, though it should work. I hope I will be able to test that soon.

Closes #27

Using the LED status, we can determine the player index for each device, and automatically assign all slots based on that
@joaorb64 joaorb64 merged commit 501f81b into joaorb64:master Jan 8, 2021
@gal20 gal20 deleted the auto_detection branch January 8, 2021 19:46
joaorb64 added a commit that referenced this pull request Jan 15, 2021
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

Successfully merging this pull request may close these issues.

Alternative way to match Joy-Cons devices
2 participants