Community
cancel
Showing results for 
Search instead for 
Did you mean: 
hp
Beginner
919 Views

How to use Floating Data Type in Quark D2000 ?

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
64 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