Page 1 of 1

TouchScreen axis rotation

PostPosted: Fri Jun 20, 2014 5:19 am
by pulciux
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

Re: TouchScreen axis rotation

PostPosted: Fri Jun 20, 2014 8:48 am
by pulciux
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.

Re: TouchScreen axis rotation

PostPosted: Sun Jun 22, 2014 9:01 am
by strancara
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.

Re: TouchScreen axis rotation

PostPosted: Tue Jun 24, 2014 4:29 pm
by pulciux
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.

Re: TouchScreen axis rotation

PostPosted: Tue Jun 24, 2014 7:30 pm
by strancara
sorry, should be fixed now.

Re: TouchScreen axis rotation

PostPosted: Wed Jun 25, 2014 5:19 am
by pulciux
Thank you so much! It works like a charm!
Are you planning to keep the parameter enabled in your future official module releases?