Skip to main content
Wrend.1
Associate III
November 10, 2020
Solved

Can I change the frame rate of the screen transition ?

  • November 10, 2020
  • 5 replies
  • 2184 views

The speed of screen transition is too fast, I want to slow it. How should I do?

This topic has been closed for replies.
Best answer by Martin KJELDSEN

There currently is no good way to change the speed of e.g. a slide transition. If you go to touchgfx\framework\include\touchgfx\transitions\SlideTransition.hpp, you can change the steps (and thus the speed speed) in the constructor. This would affect all transitions - But if you modify the generated files the change would get overwritten.

An animation has an easing-equation associated with it. The fewer steps, the faster the animation.

template <Direction templateDirection>
class SlideTransition : public Transition
{
public:
 SlideTransition(const uint8_t transitionSteps = 20)
 : Transition(),
 snapshot(),
...

 /Martin

5 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
November 18, 2020

There currently is no good way to change the speed of e.g. a slide transition. If you go to touchgfx\framework\include\touchgfx\transitions\SlideTransition.hpp, you can change the steps (and thus the speed speed) in the constructor. This would affect all transitions - But if you modify the generated files the change would get overwritten.

An animation has an easing-equation associated with it. The fewer steps, the faster the animation.

template <Direction templateDirection>
class SlideTransition : public Transition
{
public:
 SlideTransition(const uint8_t transitionSteps = 20)
 : Transition(),
 snapshot(),
...

 /Martin

Wrend.1
Wrend.1Author
Associate III
November 19, 2020

:* Thanks, it works.

davaba
Associate II
January 14, 2023

Hi. I have this problem too.

I changed the transitionSteps and it worked in the simulator in touchgfx

but when I programmed the code on board the screen transition is very fast and not changed according to (transitionSteps).

how can i solve it ?

Romain DIELEMAN
ST Employee
January 16, 2023

Hi,

Just to verify, what transition are you using ? If you are using the slide transition, did you enable the animation buffer ? This step is mandatory for this transition.

/Romain