Skip to content

Commit d6ac748

Browse files
Wolfgangper1234
Wolfgang
andauthored
Prevent truncation of temperature reading
Co-Authored-By: per1234 <[email protected]>
1 parent 5bab484 commit d6ac748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LSM6DS3.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ int LSM6DS3Class::readTemperature(float& t)
188188
return 0;
189189
}
190190

191-
t = data[0] / 16 + 25;
191+
t = data[0] / 16.0 + 25;
192192

193193
return 1;
194194
}

0 commit comments

Comments
 (0)