Skip to main content
ADębs.1
Senior
May 18, 2021
Solved

STM32F746G-DISCO, STM32CubeIDE, GFX INTERACTIONS

Hi

I have two screens A and B.

On A ButtonSTART (Toggle).

On B ButtonSTOP (Toggle).

ButtonSTART is to change to screen B and turn on the counter.

ButtonSTOP is to change to screen A and stop the counter.

After changing screen A to B, ButtonSTART should be 0.

After changing screen B to A, ButtonSTOP should be 0.

How to set up GFX INTERACTION?

greetings

Andrzej

This topic has been closed for replies.
Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
May 21, 2021

Not sure I get what you are trying to do. but you could set the "buttons" to 0 when you start the animation from a screen to another. You could do it through TouchGFX Designer in the Interactions tab by using the trigger "Screen Transition begins".

/Romain

6 replies

Romain DIELEMAN
ST Employee
May 19, 2021

Hi,

You could set the counter to 0 in the <nameOfScreen>View.cpp in the <nameOfScreen>::setupScreen function.

/Romain

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

Hi

I am not talking about the operation on the counter but about setting the buttons to 0 after changing the screen.

greetings

Andrzej

Romain DIELEMAN
ST Employee
May 19, 2021

What do you mean by settings the buttons to 0 if it is not the counter ?

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

Yes. stop = 0

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
May 21, 2021

Not sure I get what you are trying to do. but you could set the "buttons" to 0 when you start the animation from a screen to another. You could do it through TouchGFX Designer in the Interactions tab by using the trigger "Screen Transition begins".

/Romain

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

Hi

I wrote a test program:

1.Press START

1.1 send button state to main.c

1.2 change screen

1.3 start htm3

2.Press STOP

2.1 sending button state to main.c

2.2 screen change 2.3 stop htm3

2.4 I set start = 0 in main.c

2.5 I set the counted pulses total_current = 0 in main.c

3.Press START I want him to change screen and count again.

How to do it?

Andrzej