-
Notifications
You must be signed in to change notification settings - Fork 31
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
Multiple axis events send for one axis #5
Comments
Hi, maybe this has something to do with SDL and/or the driver of the joystick used by the system. If possible, could you please share what OS are you using? |
I am using Ubuntu 18.04 |
in SDL_Joysticks.cpp line 138 comment out one switch case, since both get triggered on joystick movement.
|
The @bannedas 's tip solved the problem for me. The SDL_JOYAXISMOTION and the SDL_CONTROLLERAXISMOTION where both trigged. That was the problem. I added the following changes to SDL_Joysticks function::update() Before:
Now:
That way only one of the types of events is considered for axis events. Thank you. |
@Bollos00 Thanks for the PR! Should I close the issue? |
Yes, thank you. |
I have been having some problems using the Qjoysticks library to receive commands from a game controller (in my case, PS4 Controller and XboxOne Controller).
When connecting the control to the PC and running JoystickList, the JoystickList interface indicates that the control has been connected and the button’s events and POV’s events work perfectly, but the axes don't seem to work properly.
The interface list shows 6 axes detected (as it should), and the expected events for each axes – I believe – are the following:
The LX (0), LY(1) and R2(5) axes work as they should work, but the others, when called, trigger more than one axis.
When I move the axis RX, I see in the interface that the axis 2 and 3 move together. When moving the RY axis, the 4 and 5 axes move. And when pressing L2 (or LT), the 2 and 4 axes move together. I do not understand the reason why axis 2, 3 and 4 are sending events from more than one axis.
I have already tested it with a XboxOne control and a PS4 control and – in both situations – I have found the same issue.
I know very little about the subject and can be letting something pass, but I spent some time looking and I did not identify the problem.
Thanks in advance.
The text was updated successfully, but these errors were encountered: