linguini1 commented on issue #17365:
URL: https://github.com/apache/nuttx/issues/17365#issuecomment-3568035199

   > @raiden00pl @xiaoxiang781216 @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.
   


-- 
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]

Reply via email to