1 Reply Latest reply on Mar 4, 2016 3:20 AM by aleesi

    How to use Floating Data Type in Quark D2000 ?

    harryflyer406

      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.

        • 1. Re: How to use Floating Data Type in Quark D2000 ?
          aleesi

          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

          1 of 1 people found this helpful