cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify frame per rate (fps) speed in simulator?

BParh.1
Senior III

I want to experiment different fps speed in simulator of TouchGFXDesigner, where is location to modify the code?

4 REPLIES 4
Romain DIELEMAN
ST Employee

Hi,

I have not tried it but I think you could change the value of the VsyncInterval() in mainBase.cpp in the TouchGFX/generated/simulator/src folder.

/Romain

So instead of the initial value of 16.6667ms (corresponding to a frequency of 60Hz) you could put 33.3334ms for 30Hz

BParh.1
Senior III

Thank you @Romain DIELEMAN​ , it works! However the file mainBase.cpp is meant for read only, and would override next time I generate code. Is there any place where it would not be overridden? I want the change committed to repository as well.

Romain DIELEMAN
ST Employee

What you could maybe do is modify the main.cpp in the TouchGFX/simulator folder. The VsyncInterval function I told you to modify is part of the setupSimulator function which is found in the generated folder like you said and will be overwritten. But this function is called that the main.cpp which can be modified.

So instead of calling setupSimulator(), just copy the content/code of that function from mainBase.cpp to the main.cpp so that you can modify it without being overwritten at every code generation.

/Romain