Skip to content

Commit 29a8359

Browse files
committed
Added property to set/get the auto_range attribute
1 parent 16cdfb9 commit 29a8359

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Adafruit_L3GD20_Unified/Adafruit_L3GD20_Unified.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ def __init__(self, autorange = False, range = GYRO_RANGE_250DPS, busnum=-1, debu
173173
# Nothing to do ... keep default values
174174
# ------------------------------------------------------------------
175175

176+
@property
177+
def autoRange(self):
178+
return self._auto_range
179+
180+
@autoRange.setter
181+
def autoRange(self, value):
182+
self._auto_range = value
176183

177184
def _uint16(self, list, idx):
178185
n = list[idx] | (list[idx+1] << 8) # Low, high bytes
@@ -182,7 +189,7 @@ def _saturated(self, list):
182189
"""
183190
Checks if any of the entries in the list has saturated the sensor readings
184191
:param list:
185-
:return:
192+
:return: Boolean
186193
"""
187194

188195
for x in list:

0 commit comments

Comments
 (0)