How to initiate customer value for screen in touchGFX

979 Views Asked by At

I have build an application using touchGFX and STM32 based on STM32F746 Disco kit.

My application have some screens with some value to display on screen. These value can setting and change by user. Every time when these value change I will save them to eeprom. When I turn off power and turn on again, I have read these value before start display screen, but them can't to load to screen until I pressed some button on screen (pressed button I will fresh this screen).

So my question: How can I initiate customer value for screen and display them when startup in touchGFX Thanks.

2

There are 2 best solutions below

0
On

This is simple, just load your data in presenter->activate().

0
On

I suggest you read the article on back-end-communication. It explains how to propagate values from your Model (e.g eeprom).

https://support.touchgfx.com/4.18/docs/development/ui-development/touchgfx-engine-features/backend-communication

From TouchGFX Designer you'll find several examples that do something similar from an F769-DISCO board (sample a button and propagate that value to the UI).