ArturSpirin/pyPS4Controller

Button has to be pushed twice to release.

Opened this issue · 4 comments

Ubuntu 20.04, Python 3.8.2, PS4 DualShock.

When I loaded up the test script when I press X, Circle, Square, Triangle, D-Pad, L1, L2 etc script will indicate the button has been pressed. In order to release the button you have to press it a second time.

on_square_press <--- button pressed first time
on_square_release <---button pressed second time
on_square_press <--- button pressed first time
on_square_release <---button pressed second time

Also appears the triggers and joypads are less sensitive and trigger does not fully decompress all the way when quickly released...

Tested the script on a Raspberry Pi 4 running Raspian and did not have any these issues.
Tested it another computer runnning ubuntu 20.04 had same issues.
Ran jstest-gtk everything appeared to be work correctly.

I encountered a similar issue. I don't know if the root cause is the same, but I managed to fix it in the end by cloning this repo and changing the "event packet format" from LhBB to 3Bh2b like so.

Because the packets were a different size than expected, this would essentially put the _file.read method out of step with the incoming messages, making it act tempermental.

Seems to work just fine now! (Note, I also had to change around the button id's for the symbolled buttons).

I am on Linux Mint 19.1 Cinnamon 4.0.10, Python 3.8.1.

This is great info @sheeshee . Thank you very much!

Thanks @sheeshee for helping to address this issue!

Hello guys, I really don't know how to mapping the buttons, could you help me?

Also, I would like to run more code if I can't find any control to connect but once the control isn't found it the program ends!

Thanks very much