-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 configuration for Nintendo Switch controllers #903
Conversation
|
||
var joyconPairConfig = joystickConfig{ | ||
Name: "Nintendo Switch Joycon Controller Pair", | ||
GUID: "5555", |
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.
Not sure where to get this, happy to investigate more with some pointers. In other examples I looked at it seemed random values were being used and I didn't see GUID mentioned in the rest of the codebase anyways.
@@ -31,6 +31,12 @@ const ( | |||
|
|||
// Configuration for the Xbox One controller. | |||
XboxOne = "xboxOne" | |||
|
|||
// Nvidia Shield TV Controller | |||
Shield = "shield" |
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.
seems this was pulled in when I was rebasing release -> dev because I accidentally started there.
pair{ | ||
Name: "sr_left", | ||
ID: 17, | ||
}, | ||
pair{ | ||
Name: "sl_left", | ||
ID: 19, | ||
}, | ||
pair{ | ||
Name: "sr_right", | ||
ID: 16, | ||
}, | ||
pair{ | ||
Name: "sl_right", | ||
ID: 18, | ||
}, |
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.
these are the "inner" right/left buttons usually only used when used as a single controller, and not with two paired together.
Hi @adregner , thanks for your work and contributing to gobot. I will make a review in the next days. For now: the nvidia shield part was accidentally removed by me with this #871 . Very nice that this was detected and fixed by you. Please could you fix also the wrong name of "sheild.json" and mention this change in your PR description. |
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.
It seems some files/changes are missing:
- please add your driver to the README.md of joystick folder
- there is no json file for this joystick (I just see it in the example, I have never tested any joystick and according to README.md the file is not mandatory)
09e6788
to
3a42311
Compare
I think i've updated it as intended. I also just found my "Nintendo Switch Pro Controller" and it seems to use the same codes as this, except there are at least 2 fewer buttons. I'm still playing with it but this should be fine for the JoyCon's. |
Thanks again. Now I will going to merge it. |
These ID's are what the test program printed out for all the buttons when I had a pair of joycon's connected with Bluetooth to my Mac. Some of them seem to change when there's only one connected, but they mostly seem like logical changes given the way they are normally held in one- and two-at-once styles.
This is only intended to be 100% accurate for the two-controller style because that's what I'm using them for in my current project. Thought this could be useful for others that want to repurpose Nintendo Switch controllers too.
While preparing this, I also discovered that some mentions of the Nvidia Shield controller were removed, which I also fixed.