@@ -197,7 +197,7 @@ def _poll_reg1(self, mask):
197
197
198
198
@property
199
199
def pressure (self ):
200
- """Read the barometric pressure detected by the sensor in Pascals ."""
200
+ """Read the barometric pressure detected by the sensor in Hectopascals ."""
201
201
# First poll for a measurement to be finished.
202
202
self ._poll_reg1 (_MPL3115A2_CTRL_REG1_OST )
203
203
# Set control bits for pressure reading.
@@ -254,7 +254,7 @@ def altitude(self):
254
254
255
255
@property
256
256
def temperature (self ):
257
- """Read the temperature as measured by the sensor in degrees Celsius."""
257
+ """Read the temperature as measured by the sensor in Celsius."""
258
258
# First poll for a measurement to be finished.
259
259
self ._poll_reg1 (_MPL3115A2_CTRL_REG1_OST )
260
260
# Initatiate a one-shot measurement
@@ -278,13 +278,13 @@ def temperature(self):
278
278
def sealevel_pressure (self ):
279
279
"""Read and write the pressure at sea-level used to calculate altitude.
280
280
You must look this up from a local weather or meteorological report for
281
- the best accuracy. This is a value in Pascals .
281
+ the best accuracy. This is a value in Hectopascals .
282
282
"""
283
283
# Read the sea level pressure in bars.
284
284
self ._read_into (_MPL3115A2_BAR_IN_MSB , self ._BUFFER , count = 2 )
285
- # Reconstruct 16-bit value and scale back to pascals .
285
+ # Reconstruct 16-bit value and scale back to Hectopascals .
286
286
pressure = (self ._BUFFER [0 ] << 8 ) | self ._BUFFER [1 ]
287
- return pressure * 2.0
287
+ return pressure * 2.0 / 100
288
288
289
289
@sealevel_pressure .setter
290
290
def sealevel_pressure (self , val ):
0 commit comments