2025-09-11 7:25 AM
Hello i'm using touch GFX with STM32H7RS-DK And i need to evaluate for a future product if display rotation is possible.
I tried this implementation but drawCacheEnabled isn't reconize by software so i removed it and the widget is working but the screen flicker betwen 0 and 180° . Is there a more actual way of rotate a screen .
// Force redrawing entire screen
virtual void draw(Rect& rect)
{
if (drawCacheEnabled)
{
// Invalidate entire screen instead of requested rect.
Rect r(0, 0, HAL::DISPLAY_WIDTH, HAL::DISPLAY_HEIGHT);
Application::draw(r);
}
else
{
// Use original rect if we are *actually* drawing and not just invalidating.
Application::draw(rect);
}
}
Thanks
Solved! Go to Solution.
2025-09-22 2:18 AM
Hi,
A big thanks for you hard work ,
Is there a toogle in the code to rotate the screen with user interaction (to show the rotation )
Thanks !!!
2025-09-23 6:01 AM
Hello @Hamady,
You are welcome, the project doesn't contain such a button, but it's implementation will mainly consist of a bypassing all the additional code (as rotations can be done in realtime). If the project answers your question, please mark it as best answer so other users can access it easily.
BR,