Skip to main content
ADębs.1
Senior
April 28, 2021
Solved

STM32F746G-DISCO, GFX, STM32CubeIDE

  • April 28, 2021
  • 2 replies
  • 3591 views

Hi

I have a counter in main.c. I have two screens A and B. The meter reading is sent to screen B and displayed. When the counter reaches 0 I want screen B to switch to A. How to set it up in GFX? greetings

Andrzej

This topic has been closed for replies.
Best answer by Romain DIELEMAN

Are you sure the if(!min_current && !sec_current) condition is ever met ? The application().gotoScreenSetScreenNoTransition() function works.

/Romain

2 replies

Romain DIELEMAN
ST Employee
April 29, 2021

Hi,

I would advise to create an Interaction within TouchGFX Designer where you set as Trigger "Hardware button is clicked" (a dummy button that you will not set) and as Action "Change screen". With this will be generated in <nameOfScreen>ViewBase.cpp a function called application().gotoScreen2ScreenNoTransition(). It will have a different name if you use another transition or have another name for screens. You can then call this function in your <nameOfScreen>View.cpp when the counter reaches 0.

0693W00000AMqARQA1.png/Romain

ADębs.1
ADębs.1Author
Senior
May 1, 2021

Hi

I tried but it doesn't work.

I'm sending files. if (! sec_current && ! min_curren) is to go to ScreenSet

How to do it?

greetings

ADębs.1
ADębs.1Author
Senior
May 1, 2021
ADębs.1
ADębs.1Author
Senior
April 29, 2021

Thank you. I will check and let you know.

Andrzej