Analog controller Limit-Zone (opposite Dead-Zone)
-
Of course I tried the other Sixaxis driver too.
-
Have you tried updating / reinstalling the driver you are using?
In any case, you seem to have the same problem I had with my Switch controller,evdev
calibration was off:
https://retropie.org.uk/forum/topic/22337/gamepad-calibration-problem/ -
@Protocultor
Thanks pal.
I was able to get it with retroarch using the evdev-joystick
evdev-joystick --e /dev/input/event4 --fuzz 0
At first it said to use --m and --M and then it said that was too ambiguous. I ended up changing the fuzz value from 10 to 0 and this worked.
What the fuzz value is I don't know, I guess it just chooses to randomly add or subtract a value from the js, which does describe its previous functionality.
Thanks again.
-
@Protocultor
The changes with evdev-joystick weren't saved so I tracked down the fuzz code in the sixaxis helper.
/usr/bin/sixaxis-helper.sh#line60
This worked for that, for other controllers and drivers a similar implement must be found. -
@Efriim someone in the comments of the Switch gamepad link came up with a nice solution for that.
First, create a script that takes the device as parameter, let's say
/opt/ps3-config
, and applies any calibration needed for that type of controller to that device:#!/bin/bash device="${1}" echo "Configuring device ${device}" sudo evdev-joystick --e $device --fuzz 0 || echo "Failed!"
...without forgetting to
chmod +x
this script.Then create a udev rule for those controllers, let's say
/etc/udev/rules.d/85-ps3gamepad.rules
, that executes the script above passing the proper device as parameter:SUBSYSTEM=="input", KERNEL=="event*", ACTION=="add", ATTRS{name}=="*PLAYSTATION(R)3 Controller*", RUN+="/opt/ps3-config /dev/input/%k"
Note that I'm speculating about how to detect the PS3 controller here, since it will depend on the name of the controller. Someone with knowledge of udev rules may come up with a better way to match the device.
The convenience of doing it this way is that you don't have to "know" or "assume" to which
/dev/input/eventX
the controller will be associated, and you can apply the calibration to multiple controllers of the same type. -
@Protocultor
I'm not sure if I could get that to work, the sixaxis.sh script has a similar rule.
/etc/udev/99-sixaxis.rules
and it links to
/etc/systemd/... sixaxishelper~ something
which calls
/usr/bin/sixaxis-helper.shI think the rule would work if there wasn't already one calling a script for that setting. But would it work if the hierarchy was changed from 99 to 80?
I think I figured out what the purpose of the fuzz value is. If this wasn't the purpose of a deadzone; it seems to help when going in one direction along the axis from it tending to go either way on the other axis, easier to run precisely straight ahead. I'm really not too sure.
-
@Efriim I just saw what you posted in your previous post,
/usr/bin/sixaxis-helper.sh
line 60. Had to install sixaxis to see it, but was worth it. Changing it to 0 is a good solution in my eyes; the less rules, scripts and external dependencies, the better IMHO.About rules that refer to the same device, that's something I cannot tell for certain; the only way to know if two rules can coexist is testing them. If it makes you feel better, in any udev conflict, the last rule wins:
http://www.timocharis.com/help/udev.htmlAbout "fuzz", your comment is the best documentation I've found online, since the
man
page for evdev-joystick is useless, and checking the source code seems to be the way to really know what it does. Regarding calibration, sometimes I miss the old joystick API...I found this project by chance:
https://github.com/gamelaster/evdev-calibration
I'm not gonna touch it, but it may be of help to you if you are not happy with "fuzz 0". -
Just a heads-up: setting the fuzz to 0 will break the sixaxis helper's timeout functionality, as the joystick axes produce constant output in the resting position.
I'm a bit swamped lately but I'll take a look at this issue soon and see if anything better can be done.
-
Hello people,
You might like to use my new utility for the exact purpose:
https://github.com/Virusmater/evdev-joystick-calibration
it uses python3 in collab with python-evdev
I didn't test it on arm processors, but it should work. In case of any problems - welcome to issues. -
@DimaKompot works great installing the "evdev" python package from source:
sudo apt install python-dev python-pip gcc sudo pip3 install evdev
Thanks for your work, a decent way to calibrate was needed.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.