Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to rotate the touch screen ? No function exists #9

Open
pistojim opened this issue Oct 17, 2023 · 2 comments
Open

How to rotate the touch screen ? No function exists #9

pistojim opened this issue Oct 17, 2023 · 2 comments

Comments

@pistojim
Copy link

Resistive touch screen XPT2026 has a function touch.setRotation(1);
How can we do the same with capacitive FT6336U ?

@pistojim
Copy link
Author

For the moment I solve it like that :

// X_Coord = tp.tp[0].x; // no flip
// Y_Coord = tp.tp[0].y; // no flip

X_Coord = tp.tp[0].y;    // X <-> Y flip
Y_Coord = tp.tp[0].x;    // X <-> Y flip

X_Coord = 320 - X_Coord;   //180 degrees flip X axis
//Y_Coord = 240 - Y_Coord;  //180 degrees flip Y axis

@asasaki-shiftall
Copy link

This library does not provide setRotaion function.
So you need to calculate rotation by yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants