Revision: 2409
http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2409&view=rev
Author: skitt
Date: 2011-03-30 20:19:10 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Save the axis mapping before the calibration (thanks to Roberto Nero
<rn...@li...> for the patch!).
Modified Paths:
--------------
trunk/utils/jscal-store.in
Modified: trunk/utils/jscal-store.in
===================================================================
--- trunk/utils/jscal-store.in 2011-03-30 20:18:23 UTC (rev 2408)
+++ trunk/utils/jscal-store.in 2011-03-30 20:19:10 UTC (rev 2409)
@@ -14,6 +14,7 @@
if [ ! -x /sbin/udevadm ]; then
echo Storing joystick configuration requires udev! >&2
+ exit 1
fi
ident=$(mktemp)
@@ -53,8 +54,10 @@
if [ ! -z "$PRODUCT" ]; then
echo "PRODUCT=\"$PRODUCT\"" >> $STORE.new
fi
+# First store the axes mapping, then the calibration
+# as they must be restored in the same order
+jscal -q $1 | cut -d' ' -f-3 >> $STORE.new
jscal -p $1 | cut -d' ' -f-3 >> $STORE.new
-jscal -q $1 | cut -d' ' -f-3 >> $STORE.new
if [ -f $STORE ]; then
mv $STORE $STORE.old
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|