(16-04-2018, 21:41)Werk_AG Wrote: (16-04-2018, 20:44)engolling Wrote: Edit: I just saw, that you rotate the display view after initialization.
Code:
tft.init();
tft.setRotation(3);
What do you mean with having setting the rotation after tft.init? I think that if done before screen don't start.
(16-04-2018, 20:44)engolling Wrote: Could it be, that TFT and touch have in this hardware version finally the same orientation.
I'm afraid that its exactly the contrary: Using setRotation(3) with those Yellow Pin Displays, the origin of the touch coordinates are on the Lower Right, not seems very logical... by comparison the displays we are used to use, with setRotation(3), have the origin of the touch coordinates at the Upper Left, which seems more logical.
Perhaps it will be possible to add an user configurable parameter to support different versions of the TFT display. Yesterday, I ordered one of those "yellow pin displays" to make some tests. I suspect that the X,Y lines are connected inverted to the HR2046.
Hello Werk,
I did not mean the "after" chronologically. I just wanted to express, that you give a 3 as rotation parameter.
I just thought in German and translated it to English

.
So at the moment the initialization of tft and touch look like this and everything is fine:
Code:
tft.init();
tft.setRotation(3);
tft.setTextWrap(false);
#if (PCB_VERSION < 20)
touch.begin();
#else
ts.begin();
ts.setRotation(3);
#endif
#endif
If you take the writing on the back side of the pcb as reference text is starting from upper left to the right.
But if I initialize with the following code, everything is also right as expected but just two times rotated counterclockwise about 90°
Code:
tft.init();
tft.setRotation(1);
tft.setTextWrap(false);
#if (PCB_VERSION < 20)
touch.begin();
#else
ts.begin();
ts.setRotation(1);
#endif
#endif
That means for me that the coordinates of the touch foil and tft are arranged more reasonable in the "yellow pin" display version.
In conclusion this means, that there is no need to change the touch library, because you can just change the rotation of the tft, pass the argument (1) and everything is fine.