Brijesh-Thakkar commented on issue #17365: URL: https://github.com/apache/nuttx/issues/17365#issuecomment-6703910551
Follow-up on the listener idea: the issue is actually in libc, not the apps. `%hf` in binary format strings is always treated as a float, so under `SENSORS_USE_B16`, uorb_generator ends up storing float bits in `b16_t` fields. For example, `999.12` becomes `0x4479c7ae`, which is read as `17529.78` in b16. The listener only looks correct because it's making the same mistake while reading it. I've opened #21537 to fix this at the libc level. `%hf` now follows the `LIBC_BFORMAT_B16` option, which is selected by `SENSORS_USE_B16`. I've also tested it at runtime on `sim:baromonitor`. If you'd prefer to keep `%hf` as float and introduce a separate specifier, I'm happy to change it. -- 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]
