cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX problems with DynamicGraphs

MatjazF
Associate II

Hello,

 

I have one problem in touchGFX with DynamicGraphs (scroll)
and interactions.

I have very simple animation in TouchGFX (version 4.22.1). Just one screen with 2 dynamicGraphs. The first Graph (Graph 1) is displayed for the first 3 seconds (Graph 2 is hidden). Then Graph 1 is hidden and displayed second graph (Graph 2) for 3 seconds (First Graph 1 is hidden). If I choose “Wrap and Clear” Graph (dynamic behavior) or “Wrap and Overwrite” graph everything works very well.

But if I choose “Scroll Graph” Type of Dynamic Behavior animation does not work very well. I have problems with interactions. Graphs are not displayed as long as defined in Interactions (3seconds). The first graph is shown sometimes 15s (interaction “wait for” is set to 3s) and then second graph is displayed maybe sometimes 8s (also set 3s).
If I remove function in Cube IDE (Version 1.13.2) “dynamicGraphFlow.addDataPoint(25)” means no line at graph. But in this case the animation is displayed OK. (1 graph is displayed 3seconds and then graph 2 is displayed 3seconds).
,

4 REPLIES 4
Tinnagit
Senior II

you should always run both graph in Scroll Graph and you can set time counter in SystemTick for switch the graph to show and hide. 

I tried also that. Works better but not perfect. I made handleTickEvent() function to count SystemTick in screen ScreenView.hpp. Then I used the function setVisible(bool vis) for show und hide graph. Now I need also to handle all texts and pictures for both graphs (Name for Graph 1, picture for graph 1 – hide and show,… ) inside the handleTickEvent() function (without interactions in TouchGFX)? For change screen I can use application().gotoStartScreenScreenNoTransition()?

Application::getInstance())->gotoStartScreenScreenNoTransition(), yes, I had use this function to change screen but it's change a whole screen. I think that it should used for change your page likee as change page 1 to next page because it's going to render all of screen then it's very heavy and slow too.

I think that you need render a necessary object on a time that you want to change. I do not recommend to render every object every time and you screen will be take time to change less than 1s which it's very necessary one to drive screen.


Tinnagit
Senior II

I didn't know how you do update your screen.
I had use a function that it's created from interactive with N Tick and I had set it to 1s which you can set to another value but this time is a limitation time of your process in that function so I had set it to 1s and I must process this function to refresh this screen finished in 1s too.

this method that can be refresh and update your screen every second and you can try by show time clock from RTC.