I used to fix this up using jscal, but the original doesn't build on 2.6.x kernels. But the Ubuntu version does.
https://launchpad.net/ubuntu/edgy/+sour ... u2/+files/
Just download the tarball (i.e. wget) and decompress:
tar zxvf joystick_20051019.orig.tar.gz
(I think the Ubuntu diff is for a fix for some joysticks - I don't think it's needed unless you know it's needed).
cd into the directory and issue:
make
jscal is then built (BTW, you need running kernel source tree).
At this stage you can just run it from source:
./jscal -c /dev/js0 (or whatever your JS device is).
Once done, JS is perfectly calibrated.
You can then/also save the results to a script file to be called from rc.local, or (as I do using Fluxbox) in a script when I launch Oolite.
My jscal.sh file:
Code: Select all
jscal -s 6,1,0,128,128,4194176,4227201,1,0,128,128,4194176,4227201,1,0,128,128,4194176,4227201,1,0,128,128,4194176,4227210,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/js0
Nick