Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.

Commit 66c17e3

Browse files
authored
Merge pull request #9 from adafruit/microbuilder-patch-1
Removed erroneous 4-bit shift
2 parents 2a299cb + 38ab491 commit 66c17e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_lsm303.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ def raw_magnetic(self):
177177
"""
178178
self._read_bytes(self._mag_device, _REG_MAG_OUT_X_H_M, 6, self._BUFFER)
179179
raw_values = struct.unpack_from('>hhh', self._BUFFER[0:6])
180-
values = tuple([n >> 4 for n in raw_values])
181-
return (values[0], values[2], values[1])
180+
return (raw_values[0], raw_values[2], raw_values[1])
182181

183182
@property
184183
def magnetic(self):

0 commit comments

Comments
 (0)