Skip to content

Commit

Permalink
refactor to original state
Browse files Browse the repository at this point in the history
  • Loading branch information
kattni committed Aug 6, 2018
1 parent 3037bda commit 60aa4a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions adafruit_lsm9ds1.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
except ImportError:
import ustruct as struct

import adafruit_bus_device.i2c_device as i2c_dev
import adafruit_bus_device.spi_device as spi_dev
import adafruit_bus_device.i2c_device as i2c_device
import adafruit_bus_device.spi_device as spi_device
from micropython import const

# Internal constants and register values:
Expand Down Expand Up @@ -366,8 +366,8 @@ class LSM9DS1_I2C(LSM9DS1):
"""Driver for the LSM9DS1 connect over I2C."""

def __init__(self, i2c):
self._mag_device = i2c_dev.I2CDevice(i2c, _LSM9DS1_ADDRESS_MAG)
self._xg_device = i2c_dev.I2CDevice(i2c, _LSM9DS1_ADDRESS_ACCELGYRO)
self._mag_device = i2c_device.I2CDevice(i2c, _LSM9DS1_ADDRESS_MAG)
self._xg_device = i2c_device.I2CDevice(i2c, _LSM9DS1_ADDRESS_ACCELGYRO)
super().__init__()

def _read_u8(self, sensor_type, address):
Expand Down Expand Up @@ -406,8 +406,8 @@ class LSM9DS1_SPI(LSM9DS1):
"""Driver for the LSM9DS1 connect over SPI."""
# pylint: disable=no-member
def __init__(self, spi, xgcs, mcs):
self._mag_device = spi_dev.I2CDevice(spi, mcs)
self._xg_device = spi_dev.I2CDevice(spi, xgcs)
self._mag_device = spi_device.I2CDevice(spi, mcs)
self._xg_device = spi_device.I2CDevice(spi, xgcs)
super().__init__()

def _read_u8(self, sensor_type, address):
Expand Down

0 comments on commit 60aa4a0

Please sign in to comment.