Skip to main content
Angle
Associate III
January 3, 2023
Solved

touchgfx float value

  • January 3, 2023
  • 2 replies
  • 2186 views

Hi, how can I do if I want to display the float value in touchgfx screen?

so, this is my stm32cubeide main.c which i want to display this type of data on the screen.

0693W00000Y7F1iQAF.png 

so I extern into model.cpp file.0693W00000Y7F2HQAV.png 

then I put the float value here? I got confuse since a lot of tutorial only using the uint16_t.0693W00000Y7F3UQAV.png 

Is it correct or not ? please advice me and guide me for the step or any can i refer

This topic has been closed for replies.
Best answer by Yoann KLEIN

Hello @Angle​ ,

@ktrofimo​ is right, the best solution for that is to use Unicode::​snprintfFloat() method with wildcards in a TextArea for example.

/Yoann

2 replies

ktrofimo
Senior III
January 3, 2023
Yoann KLEIN
Yoann KLEINBest answer
ST Employee
January 3, 2023

Hello @Angle​ ,

@ktrofimo​ is right, the best solution for that is to use Unicode::​snprintfFloat() method with wildcards in a TextArea for example.

/Yoann

Yoann KLEINST Software Developer | TouchGFX