LoRaMac-node
LoRaMac-node copied to clipboard
mpl3115.c uses `double`
I was compiling my code with -Wdouble-promotion
and noticed these warnings:
[...]/src/peripherals/mpl3115.c: In function 'MPL3115ReadBarometer':
[...]/src/peripherals/mpl3115.c:266:51: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
float decimal = ( ( float )( lsb >> 4 ) ) / 16.0;
^
[...]/src/peripherals/mpl3115.c:275:42: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
float decimal = ( ( float )lsb ) / 4.0;
^
Assuming those are not intentional, it should be 16.0f
/ 4.0f
instead.