]> Pileus Git - ~andy/csm213a-hw/blobdiff - vis/device.py
Save control options
[~andy/csm213a-hw] / vis / device.py
index f1766f0f57726b6e9c9121ad70281973fbcc27fa..24860bac33c430cd2aef444208d9bdd2dad08700 100644 (file)
@@ -47,10 +47,13 @@ class Device:
                        return False
                return True
 
+       def control(self):
+               pass
+
        def process(self):
                items = []
                count = 0
-               limit = 100
+               limit = 1000
                if not self.running():
                        return items
                while self.serial.readable():
@@ -95,9 +98,9 @@ class Device:
                        state.acc[1]   = float(acc_m.group(2))
                        state.acc[2]   = float(acc_m.group(3))
                if mag_m:              
-                       state.acc[0]   = float(mag_m.group(1))
-                       state.acc[1]   = float(mag_m.group(2))
-                       state.acc[2]   = float(mag_m.group(3))
+                       state.mag[0]   = float(mag_m.group(1))
+                       state.mag[1]   = float(mag_m.group(2))
+                       state.mag[2]   = float(mag_m.group(3))
                if lgt_m:
                        state.light[0] = float(lgt_m.group(1))
                if tch_m: