2023-07-16 01:26 PM
Hi friends, I have this problem:
static uint16_t txt[10];
2023-07-16 09:31 PM
Hello
Basically this should work, if your 'functionGetFloat' is returning different number every time and returned value fits to 6 char wide buffer.
This is probably not needed:
TextIndicator.setWildcard(TextIndicatorBuffer);
But you can add resizing before invalidating if text area is not enough wide:
TextIndicator.resizeToCurrentText();
Br: J.T
2023-07-17 01:27 AM - edited 2023-07-17 01:35 AM
Hi jpt1, thanks for answer.
I alternate in the same place calling text in memory like:
TextIndicator.setTypedText(TypedText(T_STATEPRODUCTMANAGERWC4));
I tried any form of solution in the hint list.
In first attempt the text change in right mode, but after the first call, it not appair over. In debug the function get called, but no showing changes on text on screen.
calling passages over
TextIndicator.setTypedText(TypedText(T_STATEPRODUCTMANAGERWC4));
or
TextIndicator.setTypedText(TypedText(T_STATEPRODUCTMANAGERWC6));
change, but trough sprintf only once and stop... i tried your solution and more other but with no luck.
PS:
if I use
TextIndicator.resizeToCurrentText();
It shift position losting central justified text position and do not resolve my problem, becose make the same issue.... appair only once and stop to work.
2023-07-17 01:54 AM
OK. What if you remove static from txt[10]- declaration ? (maybe optimization cause this issue)
I guess your TEXTINDICATOR -buffer is enough big ?
2023-07-17 02:05 AM
JTP1, thanks for your reply and your help.
The buffer is very big, I changed txt in NO static, nothing change, was in optimization O1, I changed to O0... nothing change, from text to text work, but snprintf only once. If I return in back to previous screen, it work once again, but only one change... after nothing. I think this is a touchgfx architecture or widjet problem... maybe... or I need to clear something before write back in wildcard buffer???!!
2023-07-17 02:34 AM
Which tgfx version you are using ? Actually I put you code to some test project in 4.21.4 and it worked fine. It should not be necessary to do any operations. What if you remove the typed text and snprint only one string (txt), how it then works ?
2023-07-17 02:39 AM
I working on 4.21.4 like your. I tried with only snprintf and a simple string NO float... same proble.. I can be crazy now friend... thanks for your efforts
2023-07-17 02:50 AM - edited 2023-07-17 02:53 AM
this is a screenshot of the point:
As you can see, is a state machine that change simply the string value in screen after 2 temporized situations...
PS: TEXTINDICATORSIZE is 150 char... and usually I use no more then 50 char.
2023-07-17 02:51 AM
Weird, I test it now also in target, earlier just in simulator.. still works. Maybe you can share some code more ?
2023-07-17 02:58 AM
JTP1: Maybe you can share some code more ?
Is difficolt, is big project... but for explane, everyting work propely, is only this point and this feature...