I use the following code:
NRF_LOG_RAW_INFO("\t (%f %f %f)\r\n", fgx, fgy, fgz);
I get
(f f f)
What is missing here?
I use the following code:
NRF_LOG_RAW_INFO("\t (%f %f %f)\r\n", fgx, fgy, fgz);
I get
(f f f)
What is missing here?
Hi,
You need to use NRF_LOG_FLOAT_MARKER
and NRF_LOG_FLOAT()
to print floats, as described in the documentation:
NRF_LOG_INFO("My float number" NRF_LOG_FLOAT_MARKER "\r\n", NRF_LOG_FLOAT(f)))
Best regards,
Jørgen
I'm not able to reproduce this behavior in Keil, GCC or IAR. Which compiler are you using? Have you changed anything in the SDK?
I'm not able to reproduce this behavior in Keil, GCC or IAR. Which compiler are you using? Have you changed anything in the SDK?