sparkfun/SparkFun_LSM9DS1_Arduino_Library

I2CreadBytes should return an unsigned int

sensestage opened this issue · 1 comments

The function I2CreadBytes returns an unsigned integer, but uses -1 as an error indication.
So the return variable (and probably the input argument count) should be int8 instead.

uint8_t LSM9DS1::I2CreadBytes(uint8_t address, uint8_t subAddress, uint8_t * dest, uint8_t count)

Good catch! Fixed in commit 6a48fe7. And return value is now checked by functions that use the multi-byte i2c read.