Skip to content

Commit 775d529

Browse files
Parse UT_raw as unsigned short
parse UT_raw as unsigned short, fixes temps > ~29.5°C
2 parents 9fbc600 + 5a66808 commit 775d529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bmp180.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def temperature(self):
134134
'''
135135
next(self.gauge)
136136
try:
137-
UT = unp('>h', self.UT_raw)[0]
137+
UT = unp('>H', self.UT_raw)[0]
138138
except:
139139
return 0.0
140140
X1 = (UT-self._AC6)*self._AC5/2**15

0 commit comments

Comments
 (0)