[SOLVED] Official 7" touch screen rotate works but not the touch part

Support for Air Player desktop on ARM devices, like the Raspberry Pi.

Moderators: russ, Ralph

Post Reply
Message
Author
Captain-sq
Posts: 5
Joined: Sun Dec 22, 2019 3:05 pm

[SOLVED] Official 7" touch screen rotate works but not the touch part

#1 Post by Captain-sq »

Hi folks,

My first post here. I've been scouring the forum for answers to touch screen rotation tips and solutions but cannot find anything on my particular issue.

I'm running AP 3.7 on a Pi 3B. In default (landscape) mode it works as expected. I however, need to rotate the lcd+touch 90° clockwise to get it into portrait mode to use it as an Aspen EFD1000 GPS. Here's where I came up short. As a test I put up a Cessna heading instrument. Before rotating 90°, both instrument readout and the buttons work as they should. After rotation 90°, the images/layout rotates just fine, but the button coordinates stays at its former physical position i.e. at the very same spot it was in landscape mode.

I edited the /boot/config.txt and added this at the end of the file:

Code: Select all

# Rotate the LCD touch screen 90 CW
lcd_rotate=1
display_lcd_rotate=1
I tried one of the lines each at a time and both, still no luck. Seems that the AirPlayer 3.7 OS image ignores the touch panel rotation somehow.
Is it possible to fix this, what can I do?

/Thom a.k.a. Captain SQ
Last edited by Captain-sq on Sun Jun 21, 2020 9:14 am, edited 1 time in total.

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Official 7" touch screen rotate works but not the touch part

#2 Post by Ralph »

lcd_rotate=# (your angle, e.g. 2) should be enough. Did you try that instead of the two commands?

Captain-sq
Posts: 5
Joined: Sun Dec 22, 2019 3:05 pm

Re: Official 7" touch screen rotate works but not the touch part

#3 Post by Captain-sq »

Ralph wrote: Fri Jun 19, 2020 9:28 am lcd_rotate=# (your angle, e.g. 2) should be enough. Did you try that instead of the two commands?
Yes, I tried both separately and together.
rotate_lcd=2 flips the LCD 180° (the touch panel follows correct though). rotate_lcd=1 does nothing.

display_lcd_rotate=1 rotates the LCD image correctly 90° CW but the touch panel doesn't follow the rotation.

Captain-sq
Posts: 5
Joined: Sun Dec 22, 2019 3:05 pm

Re: Official 7" touch screen rotate works but not the touch part

#4 Post by Captain-sq »

This is what I want
ASPEN-EFD.png

Captain-sq
Posts: 5
Joined: Sun Dec 22, 2019 3:05 pm

Re: Official 7" touch screen rotate works but not the touch part

#5 Post by Captain-sq »

Any suggestions...?

Captain-sq
Posts: 5
Joined: Sun Dec 22, 2019 3:05 pm

Re: Official 7" touch screen rotate works but not the touch part

#6 Post by Captain-sq »

Never mind... found it at last

Add these lines to the /boot/config.txt

Code: Select all

display_lcd_rotate=1 # rotates image
dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1 # rotates touches
Solved

Post Reply