• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Revision0204ed22a6c2d1087beadaaf39f3f6d710fb7043 (tree)
Time2012-03-08 18:24:47
AuthorTias Guns <tias@ulys...>
CommiterTias Guns

Log Message

Merge pull request #33 from koenkooi/master

Fixes needed to make the calibration script work on a Beagleboard running Angstrom

Change Summary

Incremental Difference

--- a/scripts/xinput_calibrator_pointercal.sh
+++ b/scripts/xinput_calibrator_pointercal.sh
@@ -6,18 +6,26 @@
66 #
77 # original script: Martin Jansa <Martin.Jansa@gmail.com>, 2010-01-31
88 # updated by Tias Guns <tias@ulyssis.org>, 2010-02-15
9+# updated by Koen Kooi <koen@dominion.thruhere.net>, 2012-02-28
10+
11+PATH="/usr/bin:$PATH"
912
1013 BINARY="xinput_calibrator"
1114 CALFILE="/etc/pointercal.xinput"
1215 LOGFILE="/var/log/xinput_calibrator.pointercal.log"
1316
1417 if [ -e $CALFILE ] ; then
15- echo "Using calibration data stored in $CALFILE"
16- . $CALFILE
17-else
18- CALDATA=`$BINARY -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
19- if [ ! -z "$CALDATA" ] ; then
20- echo $CALDATA > $CALFILE
21- echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
18+ if grep replace $CALFILE ; then
19+ echo "Empty calibration file found, removing it"
20+ rm $CALFILE
21+ else
22+ echo "Using calibration data stored in $CALFILE"
23+ . $CALFILE && exit 0
2224 fi
2325 fi
26+
27+CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
28+if [ ! -z "$CALDATA" ] ; then
29+ echo $CALDATA > $CALFILE
30+ echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
31+fi