Better explai your question in normal TouchGFX is implemented with RTOS and your c code is run as next thread .
Then you hav etwo ways howto send values to GUI.
- Use queue messages RTOS system from one thread to other, examples in TouchGFX docu. Good for multicore MCUS.
- Simpler method on single core RTOS run, is create for example struct with shared values between GUI and other threads and use it simply for example in handletick , struct is created in c and included as extern c in view.cpp
if (tickCounter % 2 == 0 && lastvalue != SharedStruct.newvalue) {
imageProgressL.setValue(SharedStruct.newvalue);
lastvalue = SharedStruct.newvalue;
}