2019-07-03 12:11 PM
Hi,
I have a problem redrawing the screen after changing the content. I am using FreeRTOS and TouchGFX runs in one task, and the modifications runs from a different task.
The constructor of the screen adds all drawables to the screen object. But they are not visible yet, as the content is not yet defined. The content are configured later from a different task, but to get the screen redrawn I have to make some workarounds. E.g. if I call the updateAngles() method of a single TextureMapper object, the screen normally redraws perfectly like this:
But sometimes only the half of the widgets are redrawn like this:
And when calling the updateAngles() again, the other half are redrawn:
Odd. Do I have a problem with two different frame buffers? Should I do something special to redraw a screen after modifications? Is it wrong to update the screen from a different task? (The screen object are made globally accessable bu using a pointer to the object, assigned in the screen Presenter object constructor.)
Calling invalidate() on all drawable objects, or calling the draw() method for the screen itself, seems to have no effect.
BR
Kasper
2019-07-03 09:45 PM
Hi Kasper
I've had a similar problem that the content was not updating correctly (see link below). It is very important to update the content within the tick-method of the model. I assume that it works correctly in the simulator.
Best regards
Marco
2019-07-03 11:45 PM
Hi,
Perfect. I moved the draw(); call to the tick handler, and it works nicely. The rest of the updates are stille called asynchronously from a different task, but it seems stable.
Thanks Marco.