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 posted this on their forum earlier (see forum.segger.com/index.php, and got a response telling me to enable "options->code->printf/scanf->Printf Width/Precision Supported". Maybe the version you have enables it by default now.
I posted this on their forum earlier (see forum.segger.com/index.php, and got a response telling me to enable "options->code->printf/scanf->Printf Width/Precision Supported". Maybe the version you have enables it by default now.