- center_min
- center_max
- range_min
- range_max
On the SideWinder Precision 2 stick for example they result in a 10% deadzone, which is very noticable and annoying in games, as they make it impossible to make small movements. They also result in a deadzone on the throttle control, which is totally useless. The cool thing is that those issues are not a limitation of the hardware, but just the result of the calibration values and those can be tweaked with ease, jstest-gtk contains a tab where you can tweak those values directly. Or if you don't want to bother with that, you can just use jscal, which ships with most distros:
jscal -s 6,1,0,127,127,4227201,4194176,1,0,127,127,4227201,4194176,1,0,127,127,4227201,4194176,1,0,127,127,4227201,4194176,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0
The values are not persistant, so a reboot or unplug will reset them.
That issue aside, one can do a few more useful things with the calibration interface, such as inverting an axis. The joydev interface also allows to reorder axis and buttons, if the default might not be suited for a game, that feature seems to be broken in jscal that ships with Ubuntu, but will be implemented in jstest-gtk soon (Update: its implemented).
One annoying thing with the joydev however is that there doesn't seem to be a way to get the event device associated with the joydev device, there also doesn't seem to be a way to reset calibration and button mapping back to the defaults, once changed.
Edit: The above explanation, while true, has only limited use, as most games use SDL and SDL will use evdev by default, not joydev and evdev doesn't support any kind of calibration. SDL can however be forced to use the joystick device via:
export SDL_JOYSTICK_DEVICE=/dev/input/js0
1 comment:
Post a Comment