Warning when logging a float value

Hello, 

I get a compiler warning when I try to log a float value using the LOG_INF macro in my project. The code I'm using is from the cell-fund course: lesson 6, ex. 1.
Toolchain version: v2.8.0
SDK version: v2.8.0

The warning that is appearing relates to the line:

LOG_INF("Altitude:       %.01f m", pvt_data->altitude);

warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
   61 |         LOG_INF("Altitude:       %.01f m", pvt_data->altitude);


In SDK v2.6.1 this error does not appear. Do I need to activate any additional settings in prj.conf besides these?
# Newlib
CONFIG_NEWLIB_LIBC=y
# STEP 2.2 - Enable printing of floating-points
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_FPU=y



Regards,
GoncaloS

Parents Reply Children
No Data
Related