Skip to content

Commit 8f12c9e

Browse files
committed
modify Params dict in MPU6050.py as an example for improving sensor Menus
refer to fossasia#55 , and fossasia/pslab-desktop#89
1 parent acf4720 commit 8f12c9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PSL/SENSORS/MPU6050.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def __init__(self, I2C, **args):
3333
self.I2C = I2C
3434
self.ADDRESS = args.get('address', self.ADDRESS)
3535
self.name = 'Accel/gyro'
36-
self.params = {'powerUp': ['Go'], 'setGyroRange': [250, 500, 1000, 2000], 'setAccelRange': [2, 4, 8, 16],
37-
'KalmanFilter': [.01, .1, 1, 10, 100, 1000, 10000, 'OFF']}
36+
self.params = {'powerUp': None, 'setGyroRange': [250, 500, 1000, 2000], 'setAccelRange' : [2, 4, 8, 16],
37+
'KalmanFilter': 'double' }
3838
self.setGyroRange(2000)
3939
self.setAccelRange(16)
4040
'''
@@ -47,7 +47,7 @@ def __init__(self, I2C, **args):
4747
self.K = None
4848

4949
def KalmanFilter(self, opt):
50-
if opt == 'OFF':
50+
if opt == 0:
5151
self.K = None
5252
return
5353
noise = [[]] * self.NUMPLOTS

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy