2020-10-20 07:57 AM
Hi everyone.
I have built TouchGFX with STM32F746, I will store some variable in external eeprom when screen power of, and when starting I will read these variable from eeprom to initiate for my screen,
But I don't know how to can i to do it, my screen always show value, which i initiate in willcard in TouchGFX
Thanks and best regards.
2020-10-20 08:13 AM
Simply in any Screen1View.cpp use in function
void Screen1View::setupScreen()
{
Screen1ViewBase::setupScreen();
//example
Unicode::snprintf(textAreaVerBuffer, TEXTAREAVER_SIZE, "1.%d", VERSION);
textAreaVer.setWildcard(textAreaVerBuffer);
textAreaVer.invalidate();
,,,
any other object change and invalidate
2020-10-20 08:26 AM
Thanks for your respond.
I have it, but start up screen seem start before I get value form model, where I store and read data
Unicode::snprintf(txtMainStartTimeOxyHourBuffer,TXTMAINSTARTTIMEOXYHOUR_SIZE,"%d",presenter->getOxyStartHour());
Unicode::snprintf(txtMainStartTimeOxyMinuteBuffer,TXTMAINSTARTTIMEOXYMINUTE_SIZE,"%02d",presenter->getOxyStartMinute());
before Screen turnoff I have been save data in the model, so when start i will read data from eeprom, and in model i will update it for screen.
Do we have another way?
Thanks and best regards
2020-10-20 08:51 AM
Model isnt good place for load presets. Better is main before oskernelstart or when you need model use make all object invisible in setupScreen.
Then after load change it to visible. But this cant be handled in model. You need refresh variable and manipulate objects on screen in void Screen1View::handleTickEvent()
2020-10-20 09:32 AM
That mean I can make extern variable from main, and extern it in Screen, which i need use this variable