NordicSemiconductor / Android-nRF-Connect

Documentation and issue tracker for nRF Connect for Android.
1.32k stars 312 forks source link

IEEE-11073 SFLOAT presentation doesn't recognize NaN, NRes, +inf, -inf #137

Open mhx opened 3 years ago

mhx commented 3 years ago

Is your feature request related to a problem? Please describe. For IEEE-11073 SFLOAT (format id 0x16), the special values NaN (0x7FFF), NRes (0x0800), +inf (0x07FE) and -inf (0x0802) are not recognized. Instead, the value displayed e.g. for negative infinity is 2046. Likely the same will be true for IEEE-11073 FLOAT (though I haven't checked). Maybe also for IEEE-754 floating point values.

Describe the solution you'd like I'd like to see these special values presented as e.g. NaN, NRes, +inf, -inf. Or maybe even +∞ / -∞ for infinities.

Describe alternatives you've considered n/a, this should be trivial to implement.

Additional context The format & special values are described in https://www.bluetooth.com/wp-content/uploads/2019/03/PHD_Transcoding_WP_v16.pdf

simonratner commented 3 years ago

Can confirm this is true for IEEE-11073 FLOAT type as well.

Screenshot_20201203-134205~2

Screenshot_20201203-134212~2