acassis commented on issue #17365: URL: https://github.com/apache/nuttx/issues/17365#issuecomment-3568201556
> > [@raiden00pl](https://github.com/raiden00pl) [@xiaoxiang781216](https://github.com/xiaoxiang781216) [@linguini1](https://github.com/linguini1) what is we define the type of sensor data to be float when !DEFAULT_SMALL and int when DEFAULT_SMALL (assuming that uORB will not be used on DEFAULT_SMALL) ? > > I think unfortunately it will require more work than that. There a few gotchas: > > 1. We immediately lose floating point values, so it's no longer possible for, say, an accelerometer to measure in m/s^2 unless you only want 1 m/s^2 resolution. So, all the fields will have to change from SI units to maybe something like 0.001 of an SI unit? And we'll need a large enough field, like an i32, to represent enough values. > > 2. Application level code must now handle two cases: when uORB uses floating point and when uORB uses integers. > > > You could maybe duplicate structure definitions for the uORB types and have one with float and one with int, but the user still needs to handle two distinct cases. 1. True, it is an issue to be fixed. 2. No, the idea is not to use it with uORB when CONFIG_DEFAULT_SMALL is selected, so the driver will be used as a char device sensor -- 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]
