Skip to main content
JSalz.1
Associate
August 7, 2021
Solved

Touchgfx wildcard with letter d not printed

  • August 7, 2021
  • 3 replies
  • 1403 views

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

This topic has been closed for replies.
Best answer by JSalz.1

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

3 replies

JSalz.1
JSalz.1Author
Associate
August 7, 2021

Addendum: It does not work in the simulator either:

JSalz.1
JSalz.1Author
Associate
August 7, 2021

..

JSalz.1
JSalz.1AuthorBest answer
Associate
August 7, 2021

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