2023-01-02 06:30 PM
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.
so I extern into model.cpp file.
then I put the float value here? I got confuse since a lot of tutorial only using the uint16_t.
Is it correct or not ? please advice me and guide me for the step or any can i refer
Solved! Go to Solution.
2023-01-03 05:19 AM
Hello @Angle ,
@ktrofimo is right, the best solution for that is to use Unicode::snprintfFloat() method with wildcards in a TextArea for example.
/Yoann
2023-01-02 10:08 PM
You should use Unicode::snprintfFloat() function. See documentation: https://support.touchgfx.com/4.21/docs/api/classes/classtouchgfx_1_1_unicode#function-snprintffloat as well as a little discussion here: https://community.st.com/s/question/0D53W000020jQsuSAE/how-to-display-the-value-in-float-using-snprintf
2023-01-03 05:19 AM
Hello @Angle ,
@ktrofimo is right, the best solution for that is to use Unicode::snprintfFloat() method with wildcards in a TextArea for example.
/Yoann