[oe] Handling different touchscreen calibration systems

GNUtoo GNUtoo at no-log.org
Thu May 13 17:17:07 UTC 2010


hi,
There are several way to calibrate a touchscreen:
*ts_calibrate : it uses the framebuffer and so it must be started before
xorg(an init script can do that). works only for tslib.
*xtscal : works only for kdrive and tslib(if I understood well)
*xinput-calibrator: works with xorg and can calibrate many things,but I
had huge issues with it with tslib,with /etc/pointercal from
ts_calibrate it works fine but without it can't calibrate...
Note that it also supports other protocols like evdev,evtouch etc...
*other specific uttilities for evtouch etc...

How should someone handle this.
*in machine config?
*in the distro?
*in the image?

Also to add the complexity:
*ts_calibrate should be an init script
*xinput-calibrator and xtscal are Xsession.d scripts

Moreover theses scripts could be machine specific:

*For instance I've 2 touch screens on the bug device,and so I need a
specific init script for calibrating:
#!/bin/sh
if [ ! -e /etc/pointercal ]
then
	TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb1
TSLIB_TSDEVICE=/dev/input/bmi_lcd_ts4 ts_calibrate & 
	TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb2
TSLIB_TSDEVICE=/dev/input/bmi_lcd_ts5 ts_calibrate &
	until [ -f /etc/pointercal ]
		do
			sleep 1
		done
	killall ts_calibrate
fi

That script is shipped with a recipe named tslib-init,which I didn't
commit yet because of this mail.

*htcdream has the same issue with xinput-calibrator (require having a
calibrated /etc/pointercal so it makes it useless )

*bug 2.x seem to need ts_calibrate too but only for one screen

*om-gta02 has an evdev driver which requires to feed /sys nodes with
some calibration data,the script used is an Xsession.d script that uses
xinput-calibrator



I had the idea of making recipes for handling int scripts or Xsession.d
scripts,and including them in XSERVER in the machine configuration but
I'm not shure it's a good idea.

Denis.





More information about the Openembedded-devel mailing list