Skip to content
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
2 changes: 2 additions & 0 deletions adafruit_lsm9ds1.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
_MAGTYPE = True
_XGTYPE = False
_SENSORS_GRAVITY_STANDARD = 9.80665
_SPI_AUTO_INCR = 0x40

# User facing constants/module globals.
ACCELRANGE_2G = 0b00 << 3
Expand Down Expand Up @@ -465,6 +466,7 @@ def _read_u8(self, sensor_type, address):
def _read_bytes(self, sensor_type, address, count, buf):
if sensor_type == _MAGTYPE:
device = self._mag_device
address |= _SPI_AUTO_INCR
else:
device = self._xg_device
with device as spi:
Expand Down