Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix chip_id typo in RuntimeError #6

Merged
merged 1 commit into from
Feb 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adafruit_bmp280.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self):
# Check device ID.
chip_id = self._read_byte(_REGISTER_CHIPID)
if _CHIP_ID != chip_id:
raise RuntimeError('Failed to find BMP280! Chip ID 0x%x' % id)
raise RuntimeError('Failed to find BMP280! Chip ID 0x%x' % chip_id)
self._read_coefficients()
self.sea_level_pressure = 1013.25
"""Pressure in hectoPascals at sea level. Used to calibrate `altitude`."""
Expand Down Expand Up @@ -160,11 +160,11 @@ def _read24(self, register):
return ret

def _read_register(self, register, length):
"""Low level register reading over I2C, returns a list of values"""
"""Low level register reading, not implemented in base class"""
raise NotImplementedError()

def _write_register_byte(self, register, value):
"""Low level register writing over I2C, writes one 8-bit value"""
"""Low level register writing, not implemented in base class"""
raise NotImplementedError()

class Adafruit_BMP280_I2C(Adafruit_BMP280): # pylint: disable=invalid-name
Expand Down