I want to rotate screen 90 degree in TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-06 10:35 PM
I want to rotate 90 degree the screen. How do it?
Rotate the screen 90 degrees?
Solved! Go to Solution.
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 2:28 AM
@MM..1​
I have same situation , simply create in designer upside down...
The text does not return. Something impossible is on my side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 5:27 AM
If your display have this pin maybe have next one pin for flip second axis. For good rotation you need flip both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 5:38 AM
Romain ahhh you need flip feature in PC designer app and user see it normal, but adding for example texts or image user see on PC upside down then change to 180 ... No impact in performance.
Now when user have this issue place all widgets upside down
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 6:26 AM
If your display have this pin maybe have next one pin for flip second axis. For good rotation you need flip both.
When both pins are high, the screen looks normal. But the touch part is not where the buttons are. It detects where there is no button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 12:28 PM
This simply change in touchdriver code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 10:01 PM
@MM..1​ Thank you for your comments. I don't know exactly which register address to change. I shared the register document, can you take a look?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-10 11:31 PM
You dont need for touch register setup (maybe controller IC have one but simpler way is)
edit in target file TouchGFX\target\STM32TouchController.cpp
bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)
{
/**
* By default sampleTouch returns false,
* return true if a touch has been detected, otherwise false.
*
* Coordinates are passed to the caller by reference by x and y.
*
* This function is called by the TouchGFX framework.
* By default sampleTouch is called every tick, this can be adjusted by HAL::setTouchSampleRate(int8_t);
*
*/
if(i2cRXbuff[0]==0) return false;
x=i2cRXbuff[2];
y=i2cRXbuff[4];
return true;
}
This is only example code and for change flip simply rewrite two lines x=XMAX-x; ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-11 3:43 AM
@MM..1​ It worked. I hope it won't cause any problems in the future.

- « Previous
- Next »