I am using a 240 x 320 pix display with a touch screen overlay.
The display is used in landscape orientation which is simply using the DisplayOrientation() function of the ILI9341.
This allows rotation by 90, 180 or 270 degrees. 90 (or 270) degrees rotation gives you landscape mode.
But the touch screen overlay does not have this function (FT6X06).
In the FT6X06 properties area you can flip X and/or Y, but that does not allow rotating from portrait to landscape.
The rotation can be done in software I guess, but a rotate function as for the display would be a lot simpler and less error prone.
Something you would consider?
Jan
Rotate function for Touch screen - landscape -
-
- Posts: 113
- http://meble-kuchenne.info.pl
- Joined: Mon Feb 13, 2023 7:56 pm
- Has thanked: 28 times
- Been thanked: 12 times
Re: Rotate function for Touch screen - landscape -
Actually, it's really simple to do: just swap X and Y in the touch coordinate processing.
Use the reported X to find the Y touch position, and use the reported Y to find the X touch position.
And some scale factor tuning of course.
Jan
Use the reported X to find the Y touch position, and use the reported Y to find the X touch position.
And some scale factor tuning of course.
Jan