We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 71a931c + 6b090ba commit ac70d83Copy full SHA for ac70d83
adafruit_lis3mdl.py
@@ -72,7 +72,7 @@
72
_LIS3MDL_INT_CFG = const(0x30) # Interrupt configuration register
73
_LIS3MDL_INT_THS_L = const(0x32) # Low byte of the irq threshold
74
75
-_GAUSS_TO_MT = 0.1 #1 Gauss [G] = 0.1 Millitesla [mT]
+_GAUSS_TO_UT = 100
76
77
class CV:
78
"""struct helper"""
@@ -233,7 +233,7 @@ def magnetic(self):
233
return(x, y, z)
234
235
def _scale_mag_data(self, raw_measurement): #pylint: disable=no-self-use
236
- return (raw_measurement / Range.lsb[self.range]) * _GAUSS_TO_MT
+ return (raw_measurement / Range.lsb[self.range]) * _GAUSS_TO_UT
237
238
@property
239
def range(self):
0 commit comments