Discussion:
Joystick calibration problems
CHARRIER Jean-Christophe
2004-11-28 21:19:53 UTC
Permalink
Hi.

I've just buyed a joystick for fligthgear (-0.9.6-2mdk on Mandrakelinux
10.1 with kernel 2.6.8.1-12mdk).
It's a SAITEK Cyborg-Gold-3d-USB which need to be calibrated.
What is the good way to do it ?

*The first way*
I did a calibration running “jscal -c /dev/input/js0”. After this
calibration the joystick works much better even if a “jscal -t
/dev/input/js0” returns “jscal: axes not calibrated”.

/jstest output before calibration/
Axes: 0: -5068 1: -4392 2: -9121 3: 9120 4: 0 5: 0
Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off
9:off 10:off 11:off 12:off 13:off 14:off 15:off

/jstest output after calibration/
Axes: 0: 0 1: -1057 2: 1346 3: 32767 4: 0 5: 0
Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off
9:off 10:off 11:off 12:off 13:off 14:off 15:off

How can I load the correction values automatically so that if I unplug
the joystick I don't have to recalibrate each axis?
The man page of jscal is not clear at all about the option:
-s <x,y,z...>, --set-correction <x,y,z...>.

*The second way*
Modifying the cooked joystick values in my joystick.xml file changing
dead-band, offset, factor and tolerance?
--
Jean-Christophe CHARRIER
jean-***@m4am.net
Melchior FRANZ
2004-11-28 21:44:05 UTC
Permalink
Post by CHARRIER Jean-Christophe
It's a SAITEK Cyborg-Gold-3d-USB which need to be calibrated.
What is the good way to do it ?
I did a calibration running “jscal -c /dev/input/js0”. After this
calibration the joystick works much better even if a “jscal -t
/dev/input/js0” returns “jscal: axes not calibrated”.
Same here. Forget -t.
Post by CHARRIER Jean-Christophe
How can I load the correction values automatically so that if I unplug
the joystick I don't have to recalibrate each axis?
Once calibrated, you dump a calibration script:

# jscal -p > /usr/local/sbin/jscal-cyborg.sh

and call this script from e.g. /etc/init.d/boot.local or elsewhere.
Post by CHARRIER Jean-Christophe
Modifying the cooked joystick values in my joystick.xml file changing
dead-band, offset, factor and tolerance?
You can change these if you don't like some of the values, but only if
you have calibrated the js first. Don't change the js config *instead*
of calibrating. That's evil! You would continuously have to adjust all
the values, because the js behavior changes over time. A new calibration
should be all that's needed then.

m.
CHARRIER Jean-Christophe
2004-11-29 22:01:53 UTC
Permalink
Post by Melchior FRANZ
# jscal -p > /usr/local/sbin/jscal-cyborg.sh
and call this script from e.g. /etc/init.d/boot.local or elsewhere.
Works fine. :))

I've putted my jscal-cyborg.sh in my $HOME/.fgfs directory an made a
shortcut to run it the each time the joystick is plugged.


Thanks!
--
Jean-Christophe CHARRIER
jean-***@m4am.net
Continue reading on narkive:
Loading...