Skip to content

Commit fcf1089

Browse files
committed
woops typos didnt get commited
1 parent 060cb39 commit fcf1089

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_bmp280.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Adafruit_BMP280:
6565
def __init__(self):
6666
"""Check the BMP280 was found, read the coefficients and enable the sensor for continuous reads"""
6767
# Check device ID.
68-
id = self._read_byte(BMP280_REGISTER_CHIPID)
68+
id = self._read_byte(_BMP280_REGISTER_CHIPID)
6969
if _BMP280_CHIPID != id:
7070
raise RuntimeError('Failed to find BMP280! Chip ID 0x%x' % id)
7171
self._read_coefficients()
@@ -124,7 +124,7 @@ def altitude(self):
124124
####################### Internal helpers ################################
125125
def _read_coefficients(self):
126126
"""Read & save the calibration coefficients"""
127-
coeff = self._read_register(BMP280_REGISTER_DIG_T1, 24)
127+
coeff = self._read_register(_BMP280_REGISTER_DIG_T1, 24)
128128
coeff = list(struct.unpack('<HhhHhhhhhhhh', bytes(coeff)))
129129
coeff = [float(i) for i in coeff]
130130
self.dig_T1, self.dig_T2, self.dig_T3 , self.dig_P1, self.dig_P2, self.dig_P3, self.dig_P4, self.dig_P5, self.dig_P6, self.dig_P7, self.dig_P8, self.dig_P9 = coeff
@@ -146,7 +146,7 @@ def _read24(self, register):
146146
return ret
147147

148148
class Adafruit_BMP280_I2C(Adafruit_BMP280):
149-
def __init__(self, i2c, address=BMP280_ADDRESS):
149+
def __init__(self, i2c, address=_BMP280_ADDRESS):
150150
"""Check the BMP280 was found, read the coefficients and enable the sensor for continuous reads. Default address is 0x77 but another address can be passed in as an argument"""
151151
import adafruit_bus_device.i2c_device as i2c_device
152152
self._i2c = i2c_device.I2CDevice(i2c, address)

0 commit comments

Comments
 (0)