108108
109109
110110class LSM303DLH_Mag :
111- """Driver for the LSM303DLH's 'magnetometer."""
111+ """Driver for the Driver for the LSM303DLH's 'magnetometer.
112112
113+ :param busio.I2C i2c_bus: The I2C bus the LSM303DLH is connected to.
114+
115+ """
113116 # Class-level buffer for reading and writing data with the sensor.
114117 # This reduces memory allocations but means the code is not re-entrant or
115118 # thread safe!
@@ -124,7 +127,7 @@ def __init__(self, i2c):
124127 self ._mag_rate = MAGRATE_0_7
125128
126129 @property
127- def raw_magnetic (self ):
130+ def _raw_magnetic (self ):
128131 """The raw magnetometer sensor values.
129132 A 3-tuple of X, Y, Z axis values that are 16-bit signed integers.
130133 """
@@ -137,7 +140,7 @@ def magnetic(self):
137140 """The processed magnetometer sensor values.
138141 A 3-tuple of X, Y, Z axis values in microteslas that are signed floats.
139142 """
140- mag_x , mag_y , mag_z = self .raw_magnetic
143+ mag_x , mag_y , mag_z = self ._raw_magnetic
141144 return (mag_x / self ._lsm303mag_gauss_lsb_xy * _GAUSS_TO_MICROTESLA ,
142145 mag_y / self ._lsm303mag_gauss_lsb_xy * _GAUSS_TO_MICROTESLA ,
143146 mag_z / self ._lsm303mag_gauss_lsb_z * _GAUSS_TO_MICROTESLA )
0 commit comments