cancel
Showing results for 
Search instead for 
Did you mean: 

Touchgfx wildcard with letter d not printed

JSalz.1
Associate II

Hello

I have encountered a strange problem. Actually I wanted to show a value in minutes human readable on the display (x days, y hours, z min). The value is then inserted on the display in a textarea with a wildcard. And it seems that this field has a problem with the letter d.

Eg. (TTG is the textare with the wildcard)

Unicode::snprintf(TTGValue, sizeof(TTGValue), "%d d",value/1440);

With this only the value is displayed on the display eg. 6

---

Unicode::snprintf(TTGValue, sizeof(TTGValue), "%d days",value/1440);

With this the displayed text is: 6 ays

---

In debug mode I can see, that the variable TTGValue is correct. I also tried to manipulate the string with Unicode::strncpy to add the d outside of the Unicode::snprintf function. Is this a bug in the Touchgfx library? I'm using the version 4.17.0

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
JSalz.1
Associate II

Added the letter d to the wildcard characters and now its working

View solution in original post

3 REPLIES 3
JSalz.1
Associate II

Addendum: It does not work in the simulator either:

JSalz.1
Associate II
 
JSalz.1
Associate II

Added the letter d to the wildcard characters and now its working