Tuesday, October 19, 2010

Getting TSLIB working

I emailed Donal O'Connor last night to ask if he had a compiled copy of TSLIB. He sent me his zip file this morning and I was able to get it working with the TS-TPC-7395.

Here is what I did:

On the development VM, Unzip the compiled TSLIB

On the 7395

$ mkdir /usr/local/linux-arm
$ chown -R eclipse:eclipse /usr/local/linux-arm   


Back in the Dev VM
$ cp -r linux-arm/ /usr/local/
$ scp -r linux-arm/ eclipse@192.168.0.50:/usr/local/

Back on the 7395

$ vi /root/.bashrc

Add the following lines to ./bashrc
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/linux-arm/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/linux-arm/lib/ts
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/linux-arm/lib/:/usr/local/lib:/usr/local/Trolltech/QtEmbedded-4.5.3-arm/lib/
$ export QWS_MOUSE_PROTO=Tslib


Back in the terminal:
$ su (reload bashrc)$ cd /usr/local/linux-arm/etc$ cp ts.conf ts.conf.old$ rm ts.conf$ vi ts.conf

Add the following lines to the new file (Do not add any blank lines!)
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear  

Save the document and exit 


$chmod 777 /dev/input/event0$cd /usr/local/linux-arm/bin$ ./ts_calibrate

(If it doesn't run you may need to chmod the file so it is executable (chmod 777 ts_calibrate)

No comments:

Post a Comment