Difference between revisions of "Tslib"
From ArmadeusWiki
m (→Adding Tslib support to SDL) |
(Move installation in Discussion Tab) |
||
Line 1: | Line 1: | ||
Library which provides a common interface to touchscreen and allows touchscreen events filtering or calibrating... | Library which provides a common interface to touchscreen and allows touchscreen events filtering or calibrating... | ||
− | == | + | ==Installation== |
− | + | Tslib is now installed by default on Armadeus SDK. For reference, installation instructions are kept [[Talk:Tslib|here]]. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Configuration details== | ==Configuration details== |
Revision as of 14:23, 6 July 2011
Library which provides a common interface to touchscreen and allows touchscreen events filtering or calibrating...
Contents
Installation
Tslib is now installed by default on Armadeus SDK. For reference, installation instructions are kept here.
Configuration details
Most are now automatically done in recent Armadeus SDK releases. If you are interested, history is kept here.
Config file
- Tslib plugins can be tuned with /etc/ts.conf. A default one is provided in all rootfs:
# cat /etc/ts.conf module_raw input module pthres pmin=1 module variance delta=30 module dejitter delta=100 module linear
Envt variables
- Some ENVT variables are needed too. By default they are defined in /etc/profile:
export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_TSEVENTTYPE=INPUT export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal
- If you have other input devices (like mouse or keyboard) and they have been detected by Linux before your touchscreen device, then you will probably need to adapt TSLIB_TSDEVICE variable.
Calibration
- Before first usage, a touchscreen needs to be calibrated. When starting, Tslib will look at /etc/pointercal to get calibration data. This file is created when running Tslib's calibration tool:
# /usr/bin/ts_calibrate
Testing it
# /usr/bin/ts_test
Adding Tslib support to SDL
SDL is by default compiled with Tslib support in current Buildroot distribution. You just have to make SDL knows the presence of Tslib when launching your application with:
export SDL_MOUSEDRV=TSLIB export SDL_MOUSEDEV=$TSLIB_TSDEVICE
To have an example of a SDL application using Tslib, take a look at target/demos/backlight_control/ sources.
Adding Tslib support to Qt
When selecting Qt in Buildroot menuconfig you can choose the input method to be Tslib. See Qt installation for more informations.