Skip to content

Commit

Permalink
Reads now all channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Porr committed Jan 25, 2025
1 parent 63f1e64 commit e7e8e76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LSM9DS1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,8 @@ uint8_t LSM9DS1::I2CreadBytes(uint8_t address, uint8_t subAddress, uint8_t * des
char tmp[32];
tmp[0] = subAddress;
write(fd,&tmp,1);
long int r = read(fd, dest, 2);
if (r < 0) {
long int r = read(fd, dest, count);
if ( (r < 0) || (count != r) ) {
throw "Could not read from i2c.";
}
close(fd);
Expand Down

0 comments on commit e7e8e76

Please sign in to comment.