TouchScreen axis rotation

Topics that concern all LCD-PI shields. New drivers and images for Raspberry Pi will be released through this forum.

TouchScreen axis rotation

Postby pulciux » Fri Jun 20, 2014 5:19 am

I all,
I've some trouble with TS. It appears to be 90° rotated.
The axis are flipped. It reads X position on Y direction and vice versa.
Frame Buffer calibration (ts_calibrate) seems to work for ts_test but when I launch my javafx application it is not been affected by any calibration or fb rotation I've done before.
I've searched information about kernel parameters for TSC2046.
Any hints?

Thank you
pulciux
 
Posts: 4
Joined: Fri Jun 20, 2014 5:07 am

Re: TouchScreen axis rotation

Postby pulciux » Fri Jun 20, 2014 8:48 am

Some additional info:
With "2013-09-25-wheezy-raspbian image with driver (kernel 3.6.11+)" it works as expected.
With the latest version ("New Drivers with 3.12.20+ kernel") and the previous one ("2014-01-07 Raspbian image with LCD-PI drivers") TS axis are flipped.
I'm using a LCD-PI32.
pulciux
 
Posts: 4
Joined: Fri Jun 20, 2014 5:07 am

Re: TouchScreen axis rotation

Postby strancara » Sun Jun 22, 2014 9:01 am

please try the attached kernel. Added a parameter that enables swapping XY, mirroring X and mirroring Y axes. Parameters can be set in /boot/cmdline.txt or by writing to /sys/module/lcdpitp/parameters/params. The driver looks at last 3 bits of params and:
-swaps XY if bit 3 is 1
-mirrors X if bit 2 is 1
-mirrors Y if bit 1 is 1

To just swap X and Y, you should add lcdpitp.params=0x04 to /boot/cmdline.txt.
Attachments
zImage.zip
(3.04 MiB) Downloaded 690 times
strancara
Site Admin
 
Posts: 32
Joined: Fri Mar 14, 2014 1:45 pm

Re: TouchScreen axis rotation

Postby pulciux » Tue Jun 24, 2014 4:29 pm

Thank you strancara, but I can't download the kernel you attached because the board reads "You do not have the required permissions to view the files attached to this post" even if I'm authenticated.
Can you fix this? Thank you.
pulciux
 
Posts: 4
Joined: Fri Jun 20, 2014 5:07 am

Re: TouchScreen axis rotation

Postby strancara » Tue Jun 24, 2014 7:30 pm

sorry, should be fixed now.
strancara
Site Admin
 
Posts: 32
Joined: Fri Mar 14, 2014 1:45 pm

Re: TouchScreen axis rotation

Postby pulciux » Wed Jun 25, 2014 5:19 am

Thank you so much! It works like a charm!
Are you planning to keep the parameter enabled in your future official module releases?
pulciux
 
Posts: 4
Joined: Fri Jun 20, 2014 5:07 am


Return to LCD-PI Common Topics

Who is online

Users browsing this forum: No registered users and 5 guests

cron