Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SparkFunLSM9DS1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ void LSM9DS1::readTemp()
if ( xgReadBytes(OUT_TEMP_L, temp, 2) == 2 ) // Read 2 bytes, beginning at OUT_TEMP_L
{
int16_t offset = 25; // Per datasheet sensor outputs 0 typically @ 25 degrees centigrade
temperature = offset + ((((int16_t)temp[1] << 8) | temp[0]) >> 8) ;
temperature = offset + ( (((int16_t)temp[1] << 8) | (int16_t)temp[0]) >> 4 );
}
}

Expand Down