Hello,
I'm porting a code from NRF Connect 1.1 to 1.3. Previously I was able to show in the console floats or double values, but now this seems not be possible anymore.
If I write LOG_INF("Value %f", val) on the console I've "Value %f".
Any idea ?
Hello,
I'm porting a code from NRF Connect 1.1 to 1.3. Previously I was able to show in the console floats or double values, but now this seems not be possible anymore.
If I write LOG_INF("Value %f", val) on the console I've "Value %f".
Any idea ?
Hi Luca,
NCS v1.3.0 is using an updated Zephyr version:
See release notes
Floating Point Services
FLOAT and FP_SHARING Kconfig options have been renamed to FPU and FPU_SHARING, respectively.
So if you add CONFIG_FPU=y in prj.conf then it should work.
I've CONFIG_FPU=y in my proj.conf but still doesn't work...
I worked it around by unsing a sprintf
There is the config LOG_ENABLE_FANCY_OUTPUT_FORMATTING which changes the zephyr logger to use a different format function that appears to support printing floats. If you just need the logger to print floats that is probably a more efficient than building in what sprintf needs to support floats.