-
Notifications
You must be signed in to change notification settings - Fork 14
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
Call for Participation - Test More Joysticks On Linux #5
Comments
Here a list what I found wrong (I don’t sure for the a/b/x/y buttons):
All other things work fine. |
Thanks! Looks like the A/B are swapped from what they should be, x and y are correct. Can you post the joystick ID printed in the example at start up? Just to clarify, by back left and back right, do you mean the L/LB & R/RB buttons as they would be labelled on other controllers? |
This comment has been minimized.
This comment has been minimized.
@jaapschouwenburg Thanks, I'll look into fixing this! |
No it’s two paddle buttons on the back off the controller. The xbox-one elite controller has 4 labelled p1 to p4. |
@sanpii Thanks. Interesting, I've never seen a controller with those buttons! |
Mad Catz R.A.T. Pro X mouse
Xbox One S I couldn't test Steam Controller. By default it maps its buttons to mouse and keyboard, so you need opened steam client to remap bindings to controller layout. When steam client was opened |
@knightpp is there a left mouse button on stick with id 7381718? What does Rz represent, the scroll wheel? Getting steam controller to work might be tricky, since it sounds like steam client doesn't emulate the joystick in evdev, only in the old linux joystick location. |
@sanpii @jaapschouwenburg I just pushed up changes to master that hopefully fixed the mapping issues, but I can't test them myself. If you wouldn't mind doing a git pull and reporting if something still doesn't work, that'd be awesome! |
@AldaronLau it’s fine for me! |
If I understood right - no, left mouse button didn't show anything in the log.
Yes, |
@knightpp Can you check to see if the changes I just pushed make the left button show something in the log? |
No, there is nothing on LMB, but I forgot to test all the mouse buttons. A lot of textLMB - nothing
Middle-click ( push scroll wheel down ) -
DPI switch button -
Forward button (on the left side ) -
Backward button (on the left side) -
Additional button (just below the forward and backward buttons) -
Tilt the scroll wheel to the left
Tilt the scroll wheel to the right
|
I haven't got tons of time at the moment, but I may be able to help you with the official DualShock 4 over USB/bluetooth in the near future if nobody beats me to the punch. |
The PDP Xbox One controller (E6F02A8) now has correct mappings. The Speedlink PS3 controller (E8F3075) has the following issues:
The PDP controller rumbles as long as Accept is pressed, the Speedlink doesn't rumble at all. |
@knightpp I just pushed changes for the mouse, let me know if it makes sense to you. Also added debugging stuff, so maybe left button will print something now. |
@jaapschouwenburg I think the Speedlink PS3 controller is fixed now, maybe it'll even rumble (probably not). If it doesn't work can you run install and run fftest, and tell me what it allows? |
I have a Wii U Pro Controller, but the test program doesn't appear to recognize it at all. It does show up in firefox when I try https://html5gamepad.com/. It's connected through bluetooth (the only way to connect this controller), not sure if that makes a difference. htm5gamepad.com gives the id as: 057e-0330-Nintendo Wii Remote Pro Controller I do see output for my XBox One S controller, but I see you have a response for that one above. For PS4 dual shock, I see: Connected p1, id: 54C05C4, name: Sony Computer Entertainment Wireless Controller square (left) is Action The PS4 touchpad isn't picked up, this seems to be being treated as a mouse by the driver (left & right click, touchpad itself moves mouse). |
@cinphart PS4 should be fixed on master now, thanks! I wonder if stick can only read usb controllers at the moment, I'm going to attempt to get Nintendo switch joycons working once I get bluetooth working on my computer. Don't think there's anything I can do about the touchpad, though. |
The Speedlink works perfectly now, aside from the lack of rumble.
|
LMB still prints nothing. Forward and back buttons are ok. Now the mouse scroll prints something scroll debug infoScroll up
Scroll down
|
Stick: Stick: The resolution of the stick is a lot higher than what Throttle slider (Axis 6): does not work Buttons:
|
@jaapschouwenburg Thanks! Unfortunately, it looks like it's probably a Linux driver issue, so I don't think it's possible to get stick to support rumble on the speedlink controller. |
@knightpp @Chronophylos Mappings/resolution should be better now on master. If you want to make sure it's fixed, that would be awesome! LMB doesn't give an event at all through evdev, then which means I probably can't get it to work. |
Rudder is now mapped as |
@Chronophylos I think that mapping makes sense, let me know if you think it doesn't. New changes on master just now should fix the resolution issues, hopefully. |
The resolution looks good. I think the mapping is fine. |
PS4 - buttons are now: square (left) common I have a few others that I dug out of a closet, that I'll see if I can't try later, mostly third party controllers. |
Connected p1, id: E6F0213, name: Afterglow Gamepad for Xbox 360 |
@cinphart Thanks! Looks like they both work, yay! |
Connected p1, id: E6F6302, name: Afterglow controller for PS3 |
Connected p1, id: 46DC216, name: Logitech Logitech Dual Action There's no PS/XBOX button on this controller. There is a mode switch that converts the DPAD to report Motion axes, but it's either full on or full off, and that also converts the left stick to report DPAD positions. |
Mayflash Arcade Fightstick F300. This one has three modes, XInput, gamepad, and PS3/DInput. There's a single 8-way joystick, 8 arcade buttons, select/back button and home/ps button, and a large 'start/options/menu' button. It also has a selectable DPAD or X/Y switch. In xbox mode: Stick generate MotionH/V either 1,0 or -1 in X/Y mode, or Dpad responses in DPAD mode. Eight buttons (two rows of 4, generate):
Accept also generate 'Unknown 21 0 1'. Cancel also generate 'Unknown 21 0 1' Gamepad mode: Stick generates motion/dpad responses as above Buttons:
Rt/Lt also generate 'Unknown Axis 9' reports In PS3/DInput mode Stick generates motion/dpad responses as above select/back generate Rt (id=25)
|
@cinphart I think those controllers should work correctly on master now, if you want to verify that they do. |
@cinphart Didn't see that last one until just now, so just the 2 Playstation controllers before that |
@cinphart The first two modes look fine to me, after looking up what the controller looks like. The third mode should make more sense now. |
Twin USB Gamepad bought from local store for MYR 20 (USD 4.60), it have two gamepad connected using one USB 2.0. Only one random gamepad will work and the other won't be detected.
Axis does not seemed to work, based on On another site https://html5gamepad.com/ axis does not work on both chrome and firefox, firefox is able to detect both gamepad controllers but chrome cannot, chrome is able to vibrate when pressing a button but it cannot make sound like Bottom button in right cluster pressed in the jstest example. I tried https://gitlab.com/gilrs-project/gilrs and it can detect both controllers, I think probably because they uses https://github.com/gabomdq/gamecontrollerdb.git |
@pickfire Thanks! I'll look into fixing it. |
@AldaronLau Is there any reason why this crate is created despite gilrs is already there? Maybe the project have different aims? This seemed to be more specific which only works for controllers. |
@pickfire The main reason is that I hadn't heard of gilrs when I started stick back in 2017 when gilrs was only a year old and had less than 500 all-time downloads (checking from crates.io). Now, I think the main reason is it's an option for people who want to use |
With the new changes to stick, you can now easily make your own stick mappings in the Example TOML mapping file: name = "Name from the packaging or descriptive name (Don't abbreviate PlayStation PS)"
type = "PLAYSTATION" # or whatever other type of controller
[[button]]
code = 0
event = "ActionV" # Triangle Button
[[wheel]] # unusual event type, usually won't have to include
code = 0
event = "WheelX"
[[axis]]
code = 0
event = "JoyX"
max = 0.92 # OPTIONAL: divide axis by some number (usually not needed)
[[three_way]]
code = 1
neg = "DpadLeft"
pos = "DpadRight"
[[trigger]] # An unsigned axis from 0 to 255
code = 2
event = "TriggerL"
max = 0.25 # OPTIONAL: divide axis by some number (usually not needed) When I converted everything, I don't believe I broke anything, but it might be a good idea to check to make sure if you're up for it. The file names are the hexadecimal ids returned from stick (Now twice as long to account for different joysticks having the same id). 4 digit sections may be replaced with "xxxx" to match on any controller with the other fields matching. Example: "0300FFFFFFFFxxxx.toml" will include all gamepads starting with 0300FFFFFFFF. |
I don't have all the possible game controllers that exist out there, and I can't afford to buy them all. So if you have one and feel like contributing, then try it out with the simple
readme
example in the repository (cargo run --example readme
), and make sure all the buttons return anEvent
, and that the each axis goes from -1 to 1 if it rests at 0 - joysticks (if it only goes one direction it goes positive - L & R triggers). I also want to make sure each controller has the correct mapping of buttons (ActionA shouldn't be mapped to the B button, and ActionV should always be the top button of an ABXY style layout - always either X, Y, or Triangle).For more advanced contributions, looking at how Firefox maps joysticks for the w3c gamepad API might be helpful, as the stick API is based on that. There might also be something similar in the SDL source code.You can either report back by leaving a comment with all of the unknown button and axis ids, or you can make your own mapping file in the database at
./pad_db/pad/mapping/JOYSTICK_ID.toml
and file a Pull Request:If your gamepad/joystick already works plug-and-play there's no need to comment.
The text was updated successfully, but these errors were encountered: