cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Transition on timeout

SS.Sagar
Associate III

I am using TouchGFX and currently using simulator only. I want to change the 1st Screen after 2 Seconds. How can i achieve this timeout to change the screen.

I explored all the widgets in the TouchGFX but i didn't get any option. Anyone has solution on this?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Romain DIELEMAN
ST Employee

HI,

I suppose that in your project screen 1 is the startup screen and you want to directly go to the other screen after 2s right ?

You can do it through user code, or within TouchGFX Designer with the Interactions functionality: create a first interaction with as trigger "screen transition ends" (which means once you have finally landed on screen 1 at startup for example), as action "Wait for" and as duration 2000ms. You now have a function which waits for 2s. You then check the "Can trigger another interaction" option to now create an interaction to do a transition to the other screen.

0693W000008zHevQAE.png 

When you check the "Can trigger another interaction" you will see that a new trigger option is available : "another interaction is done". With this you can now use the action "change screen" and set what kind of transition you want to go to screen 2.

0693W000008zHfKQAU.pngNot sure if useful for your project but you can change the speed of the transitions in their respective .cpp files (so SlideTransition.cpp for slide transitions) and increase/decrease the number of steps (1 step is 1 tick, so 60 steps should be 1s)

/Romain

View solution in original post

3 REPLIES 3
Romain DIELEMAN
ST Employee

HI,

I suppose that in your project screen 1 is the startup screen and you want to directly go to the other screen after 2s right ?

You can do it through user code, or within TouchGFX Designer with the Interactions functionality: create a first interaction with as trigger "screen transition ends" (which means once you have finally landed on screen 1 at startup for example), as action "Wait for" and as duration 2000ms. You now have a function which waits for 2s. You then check the "Can trigger another interaction" option to now create an interaction to do a transition to the other screen.

0693W000008zHevQAE.png 

When you check the "Can trigger another interaction" you will see that a new trigger option is available : "another interaction is done". With this you can now use the action "change screen" and set what kind of transition you want to go to screen 2.

0693W000008zHfKQAU.pngNot sure if useful for your project but you can change the speed of the transitions in their respective .cpp files (so SlideTransition.cpp for slide transitions) and increase/decrease the number of steps (1 step is 1 tick, so 60 steps should be 1s)

/Romain

Shivani
Senior

Hii @Romain DIELEMAN ,

I have tried the way that you have mentioned above in the Touchgfx Designer. But I didn't got the solution as expected.

  •  My Screen was not changed after 2 seconds.

And also can you explain about the "Trigger on every N Tick" in the interactions of the TouchGFX.

What is mean by trigger on every N Tick exactly?

What is the time actually for calling a function by triggering on every N Tick?

Thanks in advance.

 

Romain DIELEMAN
ST Employee

Hi,

Sorry for the late reply I am rarely on the forum now. Could you share your project or a screenshot of the interactions you have set ? 

Concerning the "Trigger on every N Tick" option, it is an option to call an action, like changing screen or calling a custom function, every set number (N) of ticks. When you select this option you can set the number of ticks between each trigger/"action call". A tick in TouchGFX is called at every frame, so in the board examples available in TouchGFX Designer a tick would represent 1/60s as the refresh rate is set to 60fps (so 60 ticks is 1s if your project is smoothly running). If you are using a custom board, this could be different based on how you set your display and application tick source.

I'll attach a small example where it goes from one screen to another after waiting for 2s: the first screen uses the combination of the "Screen interaction ends" and "another interaction is done" as I showed in my initial answer, and the second screen uses the "trigger on every N tick" where it waits for 120 ticks (so 2s) before changing screen. I do not recommend using this method if the objective is just to change screen but I mean it does work so why not, it just seems odd :beaming_face_with_smiling_eyes:.

 

/Romain