Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

How to use Floating Data Type in Quark D2000 ?

hp
Beginner
1,007 Views

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.

0 Kudos
1 Reply
Alejandro_Q_Intel
152 Views

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