TOUCHSCREEN calibration

Post Reply
spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

TOUCHSCREEN calibration

Unread post by spotrlederer » Tue Mar 05, 2013 8:25 am

is there a way to calbrate touchscreens in ICS 4.0.3? Is there a built in app or can it be added? I have changed my screen orientation to portrait by addiding a surface flinger rotation =90 to my default.prop that works well, but my touchscreen doesn't rotate with it. i am not using a specific touchscreen driver, just the usbhid driver with an IDC file for my screen. I had to go into inputreader.cpp and flip X and Y axis to get those lined up right on the new orientation, but the cursor movement scaling is WAY OFF. is there a way to calibrate for this or do i have to change the code in inputreader.cpp for scaling? what code would i change?

User avatar
robroy
Posts: 3418
Joined: Mon Feb 25, 2013 2:29 am
languages_spoken: English
ODROIDs: Q2, X, X2, U2, U3, XU-E, XU3, XU4, C1, C1+, C2
Location: San Francisco, California
Has thanked: 0
Been thanked: 11 times
Contact:

Re: TOUCHSCREEN calibration

Unread post by robroy » Tue Mar 05, 2013 9:21 am

Try using an Android app Screen Rotation

ex. https://play.google.com/store/apps/deta ... tate&hl=en
Rob Roy, Editor-in-Chief of ODROID Magazine (submit an article | make a donation)

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Wed Mar 06, 2013 5:18 am

i can't use any external apps to do this job of rotation. it is something i have to do in source code. Is it possible to integrate TSLIB into the source code of inputreader.cpp and inputreader.h and have it build with the android compile?

User avatar
odroid
Site Admin
Posts: 32146
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 296 times
Contact:

Re: TOUCHSCREEN calibration

Unread post by odroid » Wed Mar 06, 2013 1:58 pm

We didn't try that..

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Thu Mar 07, 2013 10:17 am

There is an arm code base for TSLIB as well as for x86. i believe the android x86 project has already incorporate TSLIB into inputreader.cpp. now im trying to integrate it here for a non capacitive multitouch screen. you try odroid and i'll try and we will see who wins :)

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Thu Mar 14, 2013 5:27 am

any luck on building the tslib into inputreader odroid?

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Sat Mar 23, 2013 1:55 am

I'm so close to having this done. Will post updated changes to rom when I'm done. Very handy if you work with large touchscreens. Having an issue with the framebuffer not outputting the calibration crosshairs. Just blank screen. Might have a workaround tho. I address /dev/graphics/fb0 in my ts_calibrate, ts.env, fbutils, but I get no crosshairs after I stop zygote. Any ideas anybody?


UPDATE: I have discovered that in android ICS using kernel 3.0 and up, /dev/graphics/fb* is broken. it is only there for drm compatibility. Is there any other way to toss my crosshairs up on screen now that i know this?

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Thu Mar 28, 2013 3:00 am

bump.

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Tue Apr 02, 2013 4:08 am

So i still haven't gotten a calibration app integrated with android. The closest i got was adding support into Inputreader.cpp and inputreader.h and adding tslib and libraries to external folder. tslib builds correctly and integrated into android correctly. I then use a shell script to shutdown zygote, bootanim, and surfaceflinger and run tslib. but crosshairs never appear onscreen because they are drawn to /dev/graphics/fb0 which does not appear to work properly in newer kernels. anyone know why framebuffer is blank, or how to add calibration running in android without the need to stop zygote and surfaceflinger?

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Thu Apr 04, 2013 5:32 am

so does no one have an answer for this? is the framebuffer broken on newer kernels? is there a fix for this? is there a touchscreen calibration app i can add here? anybody?

mdrjr
Site Admin
Posts: 11723
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 12 times
Contact:

Re: TOUCHSCREEN calibration

Unread post by mdrjr » Thu Apr 04, 2013 7:12 am

if the framebuffer was broken you wouldn't get any image...

Our framebuffer driver is working :( I think that there's a issue on running tslib

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Thu Apr 04, 2013 7:41 am

tslib is using fbutils.c and is trying to draw the crosshairs for calibration to /dev/graphics/fb0. but when i stop zygote and surfaceflinger, the crosshairs never come up. mind taking a look at the code and seeing if you can spot why it isn't drawing to the framebuffer? I have gotten this to build clean and integrate into my android. i call calibration by running 'touchcal' which i copy over to /system/bin. i can see on console that my touches are getting through to TSLIB, but since i can't SEE the calibration targets, it is pretty worthless. but if i do a mock calibration with the wrong points on purpose, it totally works. I had to edit my inputreader.cpp and inputreader.h to accept this (also included along with eventhub.cpp).
Attachments
tslib.zip
TSLIB from rowboat ICS for TI omap
(163.88 KiB) Downloaded 333 times

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Wed May 01, 2013 3:49 pm

fixed. used a java app to generate pointercal file, ported code for tslib to work on ICS 4.0.4, export environment variables for tslib in init.rc and voila! Full working calibration for any input device with full plugins like linear scaling and dejitter.

User avatar
odroid
Site Admin
Posts: 32146
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 296 times
Contact:

Re: TOUCHSCREEN calibration

Unread post by odroid » Wed May 01, 2013 3:57 pm

Great Job!

I think it will be very useful for this project also.
http://forum.odroid.com/viewtopic.php?f=52&t=1045

Can you share your code of tslib and java app?

spotrlederer
Posts: 65
Joined: Mon Feb 25, 2013 3:16 am
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by spotrlederer » Thu May 02, 2013 3:28 am

i have to clean it up a bit and write up some instructions, but sure...code is on the way!

User avatar
odroid
Site Admin
Posts: 32146
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 296 times
Contact:

Re: TOUCHSCREEN calibration

Unread post by odroid » Thu May 02, 2013 5:35 pm

Really appreciate your sharing!

Glorin
Posts: 52
Joined: Fri Nov 15, 2013 8:01 pm
languages_spoken: russian, english
ODROIDs: odroid-x2, odroid-u3
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by Glorin » Fri Nov 15, 2013 8:08 pm

some how possible get tslib? I wish try calibrate touch screen with it.

Toine45
Posts: 21
Joined: Sun Aug 10, 2014 7:04 pm
languages_spoken: French, English
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by Toine45 » Mon Aug 18, 2014 10:24 pm

Any Update ? TSLIB should be integrate :'(

Glorin
Posts: 52
Joined: Fri Nov 15, 2013 8:01 pm
languages_spoken: russian, english
ODROIDs: odroid-x2, odroid-u3
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by Glorin » Mon Aug 18, 2014 10:32 pm

i think it possible make with standard adroid idc file, in my case not need calibrate touch

lakshman
Posts: 1
Joined: Tue Dec 04, 2018 4:13 am
languages_spoken: english
ODROIDs: Qualcomm snapdragon board
Has thanked: 0
Been thanked: 0
Contact:

Re: TOUCHSCREEN calibration

Unread post by lakshman » Tue Dec 04, 2018 4:22 am

Hi,

I'm facing similar issue on my android display unit with touchscreen. When I run ts_calibrate, I'm not seeing the calibration target or any frame supporting the calibration app. It is blank. But I could see the calibration utility running from the console and the co-ordinates get populated over there. I'm using the recent tslib pulled out from git. Can you please let me know the update to be done or either share your updates would be of great help.

Thankyou!

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 2 guests