tslib integration (for >= KitKat)

75 views
Skip to first unread message

petr....@gmail.com

unread,
Oct 13, 2015, 7:10:44 AM10/13/15
to android-porting, Petr Vorel
Hi there,

has anyone integrated / ported tslib for Android KitKat, Lollipop or Marshmallow? Or is there better way for adjusting (cropping) touch area (kernel drivers)?

Thanks for any info

Kind regards,
Petr

Martin Fuzzey

unread,
Oct 17, 2015, 5:49:13 PM10/17/15
to android-porting, petr....@gmail.com
Hi,

Not sure why you need it.

The kernel driver should indicate the touchscreen coordinates corresponding to the corners (eg my controller gives 1024x1024)
The Android input manager then handles the transform between the display coordinates and touchscreen coordinates.

dumpsys input shoud show what it's doing.

One thing to look out for is Android's notion of external and internal input devices.

For example, by default, if you connect a USB touchscreen controller Android will assume it is for an external screen (even if there isn't one) and calculate the transform based on the resolution of this (possibly non existant) screen.
It doesn't do this for touchscreens connected over other interfaces (eg I2C)

I had to modify the input service to add an extra parameter to the .idc file to force certain devices to internal for this case (where the primary touchscreen is on USB)..

Regards, 

Martin
Reply all
Reply to author
Forward
0 new messages