The central problem is due to an astrological phenomenon colloquially known as "joystick driver fuckery". To make our lives more difficult, the linux driver for PS4 controllers sends both a button press and an anolog axis for each trigger. The button press is sent when the analog axis crosses the 0.5 threshold. However, the button mapper waits for a slightly higher threshold for analog axes, causing the digital button to be used for the trigger. Even worse, when the axis is detected, it is erroneously assigned to the next trigger and causes "skipping" in the mapper.
The configuration block in this diff is what the output of the "Ignore Input" approach created.
(Additional controller profiles not needed, Kodi should automatically translate to other controllers when the default map is known.)
Motivation and context
While working on Smart Home (https://github.com/xbmc/xbmc/pull/21183) and connecting my LEGO train to the PS4 controller output, I noticed that the train could only go zero throttle or full throttle.
And let me tell you, at full throttle of LEGO 9v motors overvolted to 12V and pumped via a high current robotics motor controller, the train FLIES off the track.
Description
This PR updates the Wireless PS4 controller (both v1 and v2) added in https://github.com/xbmc/peripheral.joystick/pull/117 to use analog axes for the triggers instead of digital buttons.
The central problem is due to an astrological phenomenon colloquially known as "joystick driver fuckery". To make our lives more difficult, the linux driver for PS4 controllers sends both a button press and an anolog axis for each trigger. The button press is sent when the analog axis crosses the 0.5 threshold. However, the button mapper waits for a slightly higher threshold for analog axes, causing the digital button to be used for the trigger. Even worse, when the axis is detected, it is erroneously assigned to the next trigger and causes "skipping" in the mapper.
To allow for mapping PS4 controllers, I added an "Ignore Input" button which I describe here: https://kodi.wiki/view/HOW-TO:PlayStation_4_controller
The configuration block in this diff is what the output of the "Ignore Input" approach created.
(Additional controller profiles not needed, Kodi should automatically translate to other controllers when the default map is known.)
Motivation and context
While working on Smart Home (https://github.com/xbmc/xbmc/pull/21183) and connecting my LEGO train to the PS4 controller output, I noticed that the train could only go zero throttle or full throttle.
And let me tell you, at full throttle of LEGO 9v motors overvolted to 12V and pumped via a high current robotics motor controller, the train FLIES off the track.
Related PRs
Introduced in https://github.com/xbmc/peripheral.joystick/pull/117