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

fix xbox controller buttons #47

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

smartynenko
Copy link
Contributor

Current Xbox 360 button assignment appear to be incorrect and do not match controller return values. Could you update mapping to match standard gamepad layot ?

@rbrott
Copy link
Member

rbrott commented Feb 2, 2021

cc @NoahBres

@NoahBres
Copy link
Contributor

NoahBres commented Feb 2, 2021

I never tested the Xbox 360 controller because of the inability to refactor the id system using PID/VID. I just left the original implementation in. I have no idea whether it follows the standard w3 spec or not. Perhaps the browser implementation may have changed since you originally created it. The spec isn't very solid so that would not be so far-fetched.

Would you like me to test it? I can get access to one by next week if so. But I'm assuming smartynenko has done so and this PR is based on their own testing.

@rbrott
Copy link
Member

rbrott commented Feb 2, 2021

@smartynenko Can you include the OS, browser, and gamepad ID tuples that you've tested? A comment in the source would be great.

@NoahBres More testing would help, but I'm fine being lazy and waiting for people to report broken mappings.

@rbrott
Copy link
Member

rbrott commented Feb 2, 2021

@smartynenko Thanks. Sorry to be a pain, but I want to be precise. Is the id field value "generic controller (VID=24C6, PID=530A)"?

@smartynenko
Copy link
Contributor Author

np. are you referring to gamepad.id field? My controller reports identifies itself as Xbox 360 Controller (XInput STANDARD GAMEPAD)

@rbrott
Copy link
Member

rbrott commented Feb 2, 2021

Yes. In both browsers? I guess the VID/PID isn't exposed through the API. Also is gamepad.mapping "standard"?

@smartynenko
Copy link
Contributor Author

correct, same id=Xbox 360 Controller (XInput STANDARD GAMEPAD) and mapping=standard values in both browsers.

@rbrott
Copy link
Member

rbrott commented Feb 2, 2021

Awesome. It'd be great if you could slip those strings into the comment.

@rbrott
Copy link
Member

rbrott commented Feb 2, 2021

Perfect. Thanks!

@rbrott rbrott merged commit a875b4c into acmerobotics:master Feb 2, 2021
@smartynenko smartynenko deleted the Xbox-360-buttons-fix branch February 3, 2021 00:11
j5155 pushed a commit to jdhs-ftc/ftc-dashboard-record that referenced this pull request Jul 22, 2024
* fix xbox controller buttons

* add controller and browser details

* updated controller details

Co-authored-by: Sergei Martynenko <sergei.martynenko@gm.com>
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.

3 participants