2021-08-07 04:14 AM
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
Solved! Go to Solution.
2021-08-07 08:33 AM
Added the letter d to the wildcard characters and now its working
2021-08-07 04:31 AM
Addendum: It does not work in the simulator either:
2021-08-07 04:32 AM
2021-08-07 08:33 AM
Added the letter d to the wildcard characters and now its working