Skip to content

Commit b7f9f04

Browse files
committed
polishing dox
1 parent 24bc1df commit b7f9f04

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ bundles
99
*.DS_Store
1010
.eggs
1111
dist
12-
**/*.egg-info
12+
**/*.egg-info
13+
.vscode

adafruit_lsm303dlh_mag.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,11 @@
108108

109109

110110
class 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

Comments
 (0)