cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGfx custom container

spate.2
Associate III

Is there any way to update 4 textarea with a single invalidate call? Or is there any way to add multiple text area in a custom container and update all text area with a single call of invalidate?

6 REPLIES 6
JTP1
Lead

Hello

Sure it is possible by using custom container. Just set those textareas to customContainer and then place this container to your screen (or parent container).

Note that you cannot access those text areas then outside the container directly. You must write public functions to customContainer to manipulate text area content and then you can also invalidate it in same function. I guess there is no need for invalidation if the content is not manipulated somehow. But you can write function to customContainer  which just invalidates all textAreas in it.

If you need more specific answer, could you tell bit more about your needs, what you want to show or how update, TypedText or wildcard etc ?

Br J.T

spate.2
Associate III

Thanks, @JTP1  for your response.

I tried it but here my concern is about the MCU load. In both cases, (Individual invalidate) and ( single invalidate) MCU load is the same. 

Let me share my application in detail. In my application, there are 8 text areas with 6-digit values. When i am updating all text area individually my MCU load get increased.

When I not updating text are my MCU load is 2%. But when I am updating all 8 text area MCU load reaches 15% which is very strange. 

I used this thread to calculate MCU load https://community.st.com/t5/touchgfx-and-gui-mcu/how-to-measure-mcu-load-while-using-touchgfx/td-p/299848

Please suggest any better way to reduce MCU load.

@JTP1 

In my application, there are two screens. Screen_1 has 8 text areas and screen_2 has a dynamic graph. At time only one screen updating from the backend. 

Screen_1: all 8 text areas are updating on tick even. And MCU load is 15%. All text areas are wildcard.

Screen_2: On the tick event, a new point is added to the dynamic graph. And MCU load is 2-3%.

@JTP1 

Here I share the touchGfx creator file. Please have a look and share your valuable feedback.

 

JTP1
Lead

Hello

Have you check this document:

https://support.touchgfx.com/docs/basic-concepts/performance

There is explained why text rendering takes time and which factors affects to it.

Is your text area content really changing every tick (frame), perhaps you could do some text comparasion before even write new (same) value to wildcard buffer and invalidating it ?

Edit: Okey I check your Tgfx- file also. It seems quite simple so its difficult to find more speed on the UI structal side.

Btw what are your Cpp compiler optimization settings, its maybe worth of checking also.

Also check your map file, is your fonts saved to the external memory. If you have space, you can test to put all to internal flash and test does affect to the speed.

Br J.T

Thanks, @JTP1  for your response.

This will really help me to get better performance. I will share the result after applying the suggested approach.