Brijesh-Thakkar commented on issue #21248: URL: https://github.com/apache/nuttx/issues/21248#issuecomment-6542526575
Hi, following the direction agreed above (single sensor framework, fixed-point via include/fixedmath.h as proposed in #10644), I’d like to work on this. I don’t see anyone on it in open PRs. my plan: Add a Kconfig option (e.g. SENSORS_FIXEDPOINT, default off, maybe default y with DEFAULT_SMALL) and a sensor value type plus conversion macros, with no behavior change for float builds. Convert the sensor_* structs to that type, adjusting units where b16_t range or resolution doesn’t fit, so float and fixed builds share units. Convert the core (drivers/sensors/sensor.c) and a fake/sim sensor so it’s testable on sim, then migrate drivers in small batches. Decouple drivers that depends on UORB but only need the char interface. Questions: Is b16_t enough, or should some quantities (e.g. pressure, timestamps-adjacent values) use a wider type? Should the unit changes land as one breaking PR, or behind the Kconfig first? cc @raiden00pl @linguini1 @acassis -- 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]
