-
Notifications
You must be signed in to change notification settings - Fork 125
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
Defaulting to standard gamepad mapping when controller is unknown #48
Comments
I can PR this in but I probably won't be able to test for a bit. |
Bluetooth PS4 Gamepad doesnt in either Firefox or Safari because they report different ID's Bluetooth
Wired
|
Other have reported that the F310 doesn't work with Dash. I'm assuming it's due to the button mapping changes or an ID change. I would like to test this but I believe it would be safe to just remove the gamepad specific mappings and default to the browser standardized one now. |
I too can confirm that our Logitech F310s are not detected by FTC Dashboard. We have never reported this before now, so we add a +1 to your count. I am willing to help with testing if you would explain what you need done. |
@TimVargo Would it be possible to go to https://gamepad-tester.com/ and record/report how the gamepad behaves? It will look something like this: You can either just press all the buttons and record the screen or just post if the results match with the actual mappings. Take note of the button numbers. Right now, in Dash, the Logitech's mappings are as follows:
There are more mappings but you won't need it. The mappings are here if you're curious though:
The xbox and ps4 gamepad mappings are as follows:
I suspect what is happening is either the ID reporting at the top for the logitech is different or your mappings right now actually follow the Xbox/ps4 mappings (which is now the w3 standard). |
@smartynenko For PR #47, you tested the Xbox 360 mapping? Right stick X and Y are axes 3 and 4 which do not follow the w3 spec and do not match the PS4 mappings
|
Ngl I completely forgot about this but I can make the PR now and test tomorrow. |
Noah,
As you requested, my Logitech Gamepad F310 reports as "Xbox 360 Controller
(XInput STANDARD GAMEPAD)", and the mappings are indeed following the xbox
mappings as you suspected:
A: B0
B: B1
X: B2
Y: B3
left stick x: axis 0
left stick y: axis 1
right stick x: axis 2
right stick y: axis 3
~Tim Vargo
…On Wed, Mar 10, 2021 at 1:38 PM Noah ***@***.***> wrote:
@TimVargo <https://github.com/TimVargo> Would it be possible to go to
https://gamepad-tester.com/ and record/report how the gamepad behaves?
It will look something like this:
https://user-images.githubusercontent.com/6739076/110693552-3006a800-81ad-11eb-8098-be2a8f4b3e9b.mp4
You can either just press all the buttons and record the screen or just
post if the results match with the actual mappings. Take note of the button
numbers.
Right now, in Dash, the Logitech's mappings are as follows:
- A: B1
- B: B2
- X: B0
- Y: B3
- left stick x: axis 1
- left stick y: axis 2
- right stick x: axis 3
- right stick y: axis 4
- dpad up: 12
- dpad down: 13
- dpad left: 14
- dpad right: 15
There are more mappings but you won't need it. The mappings are here if
you're curious though:
https://github.com/acmerobotics/ftc-dashboard/blob/4a7dd96f0873422e35eb1b4d11115f9b66c6edac/FtcDashboard/dash/src/store/middleware/gamepadMiddleware.ts#L85
The xbox and ps4 gamepad mappings are as follows:
- A: B0
- B: B1
- X: B2
- Y: B3
- left stick x: axis 0
- left stick y: axis 1
- right stick x: axis 2
- right stick y: axis 3
- dpad up: 12
- dpad down: 13
- dpad left: 14
- dpad right: 15
I suspect what is happening is either the ID reporting at the top for the
logitech is different or your mappings right now actually follow the
Xbox/ps4 mappings (which is now the w3 standard).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4KHVX4T7H7HDOB3WCEPTLTC7DBTANCNFSM4XNY6PUQ>
.
|
I'm reluctant to change things again so soon. Maybe I'm missing something, but it seems like Tim's F310 should work with the current code given that it has an Xbox 360 ID? |
Sorry, must have checked in outdated version. I currently have
|
You're absolutely right. My apologies. |
To clarify what (doesn't) happen with F310, I plug in the gamepad and Windows does detect it, but pressing Start-A, or B, X, Y has no effect at all -- nothing happens with the dimmed gamepad icons. |
Do you have it in X mode or D mode? |
The one I tested with yesterday has X mode is selected on underside. Is
that correct?
~Tim
…On March 11, 2021 11:26:03 AM smartynenko ***@***.***> wrote:
To clarify what (doesn't) happen with F310, I plug in the gamepad and
Windows does detect it, but pressing Start-A, or B, X, Y has no effect at
all -- nothing happens with the dimmed gamepad icons.
Do you have it in X mode or D mode?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I was finally able to do a quick test using the default mapping using an F310 in xinput mode and all the buttons appear to be working except the guide button. I did have to do a bunch of Windows updates before I could get my browser to recognize the gamepads though. Edit: My changes are at https://github.com/jasonappah/ftc-dashboard/commit/f3ff487a7d83688d0301257a57110462b901c3c0 if anyone wants to take a look. I was testing in Chrome 88 on my Windows laptop since I can't get the drivers to support xinput on my Mac. |
Update: Turns out I was a dum dum and used 0.4.0 for my testing instead of 0.4.1. In 0.4.1 the F310 seems to work fine without any modifications in xinput mode, tested on the same system as last time. |
Oops I was wrong, everything works except the right joystick. The Y-axis shows up as the X-axis, and the X-axis doesn't work at all, but still better than 0.4.0. |
I think this would require some testing with non-ftc gamepads but it would be neat to just default to the standard gamepad layout when the ID isn't known, enabling the use of non-FTC legal gamepads for use at home or something (there have been a non-zero amount of such requests, primarily Dualshock 5 and Xbox One controllers but not really important enough to spend significant time on imo).
With PR #47, the Dualshock 4 and Xbox 360 seem to have identical button layouts. I'm assuming that most modern gamepads will share the standard w3c spec.
The text was updated successfully, but these errors were encountered: