- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi All,
I am trying to print the decimal value (example 26.7) as a output but just able to print the first two number that is 26.
Below is my code:
int tf = GetTemperature();
QM_PRINTF("Result : %lu in Celsius\n", tf/10);
what we are trying:
float tf = GetTemperature();
QM_PRINTF("Result : %3.2f in Celsius\n", tf/10);
Kindly help.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Harryflyer406,
Thanks for contacting Intel Communities.
This is not currently implemented and there is no plans as our implementation of printf (PICO_PRINTF) takes only 500bytes vs 8K that would take printf
I suggest you to have a look at bsp/sys/newlib-syscalls.c for more details on how it is implemented.
Regards,
Alex

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page