ArturSpirin/pyPS4Controller

X button is reading as Square

iobotic-code opened this issue · 3 comments

I would like to know how to change the order of the button. X button is reading as Square button

@iobotic-code I suppose mapping is off not just for X? If so, you may want to change the event format, see https://github.com/ArturSpirin/pyPS4Controller#overriding-event-format

The button mapping is tested using a USB connection as well as a Bluetooth connection to a Raspberry Pi 3B+. In both cases all mappings seem to be correct except for the four buttons X, Square, Triangle and Circle. The button_ids for those are 0, 3, 2 and 1 (in my case). This is seen using two different controllers of quite different age.

Pushed some changes related to button mapping, the module now has initial smart logic to set its button mapping based on event format that is being used. Right now its only able to support two of them automatically: 3Bh2b and LhBB.

Also, 3Bh2b is now being used as the default format and it specifically addresses the mapping for X, Square, Triangle and Circle.

Tested on Linux Mint 19.3
py2 & py3

This fixes are available in version 1.2.4