stmhal, staccel.py: Style cleanup.

This commit is contained in:
Damien George 2014-08-26 17:30:48 +01:00
parent f4ce26de5c
commit e00fb08f99
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class STAccel:
self.cs_pin.high() self.cs_pin.high()
self.spi = SPI(1, SPI.MASTER, baudrate=328125, polarity=0, phase=1, bits=8) self.spi = SPI(1, SPI.MASTER, baudrate=328125, polarity=0, phase=1, bits=8)
self.wr(LIS302DL_CTRL_REG1_ADDR, bytearray([LIS302DL_CONF])) self.wr(LIS302DL_CTRL_REG1_ADDR, bytearray([LIS302DL_CONF]))
if(self.read_id()[0] != LIS302DL_WHO_AM_I_VAL): if self.read_id()[0] != LIS302DL_WHO_AM_I_VAL:
raise Exception('LIS302DL accelerometer not present') raise Exception('LIS302DL accelerometer not present')
def rd(self, addr, nbytes): def rd(self, addr, nbytes):