This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Printf over UART fails to print floats

Hi,

I'm trying to print a float over UART but I think the NRF implementation is faulty. I've tested not UART SDK example with the following changes, inserted at line 168:

float test = 0;

printf("\r\n%.2f\r\n", test);

test = 0.431284923549;
printf("\r\n%.2f\r\n", test);

UART output:

As you can see there is clearly no printed float output.

Potentially related:

https://devzone.nordicsemi.com/f/nordic-q-a/19993/nrf_log_float-doesn-t-display-negative-numbers-properly

https://community.nxp.com/t5/Kinetis-Software-Development-Kit/PRINTF-d-doesn-t-handle-negative-numbers/m-p/621239

Parents Reply Children
No Data
Related