Skip to content

Commit

Permalink
Parse UT_raw as unsigned short
Browse files Browse the repository at this point in the history
parse UT_raw as unsigned short, fixes temps > ~29.5°C
  • Loading branch information
turbinenreiter authored Jun 4, 2018
2 parents 9fbc600 + 5a66808 commit 775d529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bmp180.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def temperature(self):
'''
next(self.gauge)
try:
UT = unp('>h', self.UT_raw)[0]
UT = unp('>H', self.UT_raw)[0]
except:
return 0.0
X1 = (UT-self._AC6)*self._AC5/2**15
Expand Down

0 comments on commit 775d529

Please sign in to comment.