Skip to content

Commit 7007934

Browse files
authored
Merge pull request #4 from tombsar/patch-1
Fix typo of numeric constant
2 parents 56ec1ef + 2e1391e commit 7007934

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/lsm303d/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def magnetometer(self):
419419
self.setup()
420420
mag = self._lsm303d.get('MAGNETOMETER')
421421
x, y, z = mag.x, mag.y, mag.z
422-
x, y, z = [(p / 32676.0) * self._mag_full_scale_guass for p in (x, y, z)]
422+
x, y, z = [(p / 32767.0) * self._mag_full_scale_guass for p in (x, y, z)]
423423
return x, y, z
424424

425425
def accelerometer(self):

0 commit comments

Comments
 (0)