2020-01-07 09:08 AM
I have a problem with Tutorial 2. I don't want to add the counter after pressing. Does not work after implementation " Using a wildcard text " ?
2020-01-08 04:16 AM
To answer your first question: Yes, you can. Because the screen name will become classes ADJUSTView, ADJUSTPresenter, so there will be no name clashes.
Your second question, please elaborate, it's a bit unclear to me,
/Martin
2020-01-08 08:31 AM
Thank you with your reply. I had a confused function name.
2020-01-08 10:34 AM
How to display a variable on the screen. I created text <value>. How do I associate this with my variable "counter" and update it on a regular basis. The variable is global.
2020-01-09 02:26 AM
https://touchgfx.zendesk.com/hc/en-us/articles/205587571-Step-3-Adding-Text
Try following this tutorial
2020-01-09 08:32 AM
Hi Martin
Studied. A bit different from my need. My variable "counter" is set in the file "main.cpp" and not from buttons. Will it be seen in other files?
2020-01-09 09:34 AM
Another community member made a youtube video on how to do this. There are TouchGFX documents as well, but the video was enough to get me going
https://www.youtube.com/watch?v=majcfxr3u2E
in main.cpp in whatever task, variable gets put into a queue
in the model.cpp in the gui the data is received from the queue and passed to the presenter, which passes it to the view. (I think I got that right)
i believe you could access the data right from the view, but I think that will cause you problems later on.
Basically there is a structure to TouchGFX and its best to follow it. By using a queue you keep the GUI thread/task and your main task from accessing the variable at the same time, which is a good idea with the RTOS.
There is a similar process for sending gui data back to the main logic.
Be sure to put your code changes in the main.cpp between the user code start and end comments.
Bob
2020-01-09 09:44 AM
Thanks Bob. I will study it.
2020-01-10 12:18 AM
Combine the tutorial that i sent you with this: Integrating with hardware - https://community.st.com/s/question/0D50X0000AU4zodSQB/interfacing-with-hardware-in-touchgfx-applications
2020-01-10 12:19 AM
The link contains projects that you can try for certain boards which are aging a bit now, but the video that @Bob Bailey posted actually uses CubeMX to do it, which is really nice!