Brijesh-Thakkar commented on code in PR #21537:
URL: https://github.com/apache/nuttx/pull/21537#discussion_r4505944292
##########
drivers/sensors/Kconfig:
##########
@@ -29,6 +29,7 @@ config SENSORS_USE_FLOAT
config SENSORS_USE_B16
bool "Use b16_t as data type for sensors"
+ select LIBC_BFORMAT_B16
Review Comment:
Good catch, thanks. sensor_eng.voltage was the only plain float member left
that is printed with %hf. I changed it to sensor_data_t voltage[4] in a new
commit before the select one (include/nuttx/uorb.h: use sensor_data_t for
sensor_eng voltage). Float builds are unchanged. Nothing in the tree reads
.voltage. I tested sensor_eng0 on sim with B16: uorb_generator stores b16_t
bits and the listener prints 3300 / 1800.5 / 300.000107 / -12.25. The sim test
cannot show a before/after difference for the type change, because the
generator writes through the format string. The change matters for drivers that
use the member directly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]