cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX, STM32F746G-DISCO

ADębs.1
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

7 REPLIES 7
Alexandre RENOUX
Principal

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

Romain DIELEMAN
ST Employee

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

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.

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.

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

Thank you very much for the hint. I will write how it turned out.

Andrzej

Hi!

You wrote: "Then in your main when the appropriate value is accheived you do the backend animation process and call that gotoscreenname transition"

I did as in the video. What's next?

greetings

Andrzej