2021-04-09 07:44 AM
Hi
I want to change the screen to another, but not with the button, but with the main.c command. how to do it?
Andrzej
Solved! Go to Solution.
2021-04-12 04:34 AM
A trick would be to use a fake button: in TouchGFX Designer go to the "interactions" tab and add an interaction with as trigger a fake "hardware button clicked" and for action "change screen". Then in your main when the appropriate value is accheived you do the backend animation process and call that gotoscreenname transition.
/Romain
2021-04-12 12:30 AM
Hello ADebs.1,
To do so, you need to use the MVP concept of TouchGFX to communicate with the backend. You need to go through the Model to communicate with main.c.
Please have a look at the documentation website :
Additionally, you will find an example code enclosed, using UART and exchanging information between main.c and TouchGFX.
When your question is answered, please close this topic by choosing Select as Best.
/Alexandre
2021-04-12 01:04 AM
Hi,
Have a look at the backend communication article in the documentation. It will help you understand how to communicate between the GUI and the main.c The common use of the backend communication is usually to communicate between the GUI and sensors, so it is the same idea.
Gustavo from ST made a video on this as well which could help you develop your project.
/Romain
2021-04-12 03:40 AM
Thank you. In general, I know the concept and apply it. I mainly mean switching from screen to screen after the counter has reached the appropriate value without the need to press a button. I will analyze the proposal and give you an answer.
2021-04-12 03:40 AM
Thank you. In general, I know the concept and apply it. I mainly mean switching from screen to screen after the counter has reached the appropriate value without the need to press a button. I will analyze the proposal and give you an answer.
2021-04-12 04:34 AM
A trick would be to use a fake button: in TouchGFX Designer go to the "interactions" tab and add an interaction with as trigger a fake "hardware button clicked" and for action "change screen". Then in your main when the appropriate value is accheived you do the backend animation process and call that gotoscreenname transition.
/Romain
2021-04-12 05:04 AM
Thank you very much for the hint. I will write how it turned out.
Andrzej
2021-04-27 10:55 AM