File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ class ICM20X: # pylint:disable=too-many-instance-attributes
166
166
_bank_reg = UnaryStruct (_ICM20X_REG_BANK_SEL , "<B" )
167
167
_reset = RWBit (_ICM20X_PWR_MGMT_1 , 7 )
168
168
_sleep = RWBit (_ICM20X_PWR_MGMT_1 , 6 )
169
+ _low_power_en = RWBit (_ICM20X_PWR_MGMT_1 , 5 )
169
170
_clock_source = RWBits (3 , _ICM20X_PWR_MGMT_1 , 0 )
170
171
171
172
_raw_accel_data = Struct (_ICM20X_ACCEL_XOUT_H , ">hhh" )
@@ -265,6 +266,17 @@ def gyro_dlpf_cutoff(self, cutoff_frequency):
265
266
self ._gyro_dlpf_enable = True
266
267
self ._gyro_dlpf_config = cutoff_frequency
267
268
269
+ @property
270
+ def low_power (self ):
271
+ """Enables or disables a low power mode for the sensors digital circuitry"""
272
+ self ._bank = 0
273
+ return self ._low_power_en
274
+
275
+ @low_power .setter
276
+ def low_power (self , enabled ):
277
+ self ._bank = 0
278
+ self ._low_power_en = enabled
279
+
268
280
@property
269
281
def _bank (self ):
270
282
return self ._bank_reg >> 4
You can’t perform that action at this time.
0 commit comments