diff --git a/adafruit_lis3mdl.py b/adafruit_lis3mdl.py index 85a8668..fa065b3 100644 --- a/adafruit_lis3mdl.py +++ b/adafruit_lis3mdl.py @@ -72,7 +72,7 @@ _LIS3MDL_INT_CFG = const(0x30) # Interrupt configuration register _LIS3MDL_INT_THS_L = const(0x32) # Low byte of the irq threshold -_GAUSS_TO_MT = 0.1 #1 Gauss [G] = 0.1 Millitesla [mT] +_GAUSS_TO_UT = 100 class CV: """struct helper""" @@ -233,7 +233,7 @@ def magnetic(self): return(x, y, z) def _scale_mag_data(self, raw_measurement): #pylint: disable=no-self-use - return (raw_measurement / Range.lsb[self.range]) * _GAUSS_TO_MT + return (raw_measurement / Range.lsb[self.range]) * _GAUSS_TO_UT @property def range(self):