File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ def readPressure(self):
165165 UP = 23843
166166 self ._cal_AC6 = 23153
167167 self ._cal_AC5 = 32757
168+ self ._cal_MB = - 32768 ;
168169 self ._cal_MC = - 8711
169170 self ._cal_MD = 2868
170171 self ._cal_B1 = 6190
@@ -197,6 +198,7 @@ def readPressure(self):
197198 print "DBG: B6 = %d" % (B6 )
198199 print "DBG: X1 = %d" % (X1 )
199200 print "DBG: X2 = %d" % (X2 )
201+ print "DBG: X3 = %d" % (X3 )
200202 print "DBG: B3 = %d" % (B3 )
201203
202204 X1 = (self ._cal_AC3 * B6 ) >> 13
@@ -207,6 +209,7 @@ def readPressure(self):
207209 if (self .debug ):
208210 print "DBG: X1 = %d" % (X1 )
209211 print "DBG: X2 = %d" % (X2 )
212+ print "DBG: X3 = %d" % (X3 )
210213 print "DBG: B4 = %d" % (B4 )
211214 print "DBG: B7 = %d" % (B7 )
212215
@@ -215,9 +218,12 @@ def readPressure(self):
215218 else :
216219 p = (B7 / B4 ) * 2
217220
221+ if (self .debug ):
222+ print "DBG: X1 = %d" % (X1 )
223+
218224 X1 = (p >> 8 ) * (p >> 8 )
219225 X1 = (X1 * 3038 ) >> 16
220- X2 = (- 7375 * p ) >> 16
226+ X2 = (- 7357 * p ) >> 16
221227 if (self .debug ):
222228 print "DBG: p = %d" % (p )
223229 print "DBG: X1 = %d" % (X1 )
You can’t perform that action at this time.
0 commit comments