File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
* .mpy
2
2
.idea
3
+ .vscode
3
4
__pycache__
4
5
_build
5
6
* .pyc
9
10
* .DS_Store
10
11
.eggs
11
12
dist
12
- ** /* .egg-info
13
+ ** /* .egg-info
Original file line number Diff line number Diff line change @@ -190,14 +190,16 @@ def __init__(self, i2c_bus):
190
190
if self ._part_id != 0x13 :
191
191
raise AttributeError ("Cannot find a MSA301" )
192
192
193
- self ._enable_all_axes ()
193
+
194
+ self ._disable_x = self ._disable_y = self ._disable_z = False
194
195
self .power_mode = Mode .NORMAL
195
196
self .data_rate = DataRate .RATE_500_HZ
196
197
self .bandwidth = BandWidth .WIDTH_250_HZ
197
198
self .range = Range .RANGE_4_G
198
199
self .resolution = Resolution .RESOLUTION_14_BIT
199
200
200
201
202
+
201
203
_disable_x = RWBit (_MSA301_REG_ODR , 7 )
202
204
_disable_y = RWBit (_MSA301_REG_ODR , 6 )
203
205
_disable_z = RWBit (_MSA301_REG_ODR , 5 )
@@ -246,6 +248,3 @@ def acceleration(self):
246
248
z_acc = ((z >> 2 ) / scale ) * _STANDARD_GRAVITY
247
249
248
250
return (x_acc , y_acc , z_acc )
249
-
250
- def _enable_all_axes (self ):
251
- self ._disable_x = self ._disable_y = self ._disable_z = False
You can’t perform that action at this time.
0 commit comments