]> sigrok.org Git - sigrok-meter.git/commitdiff
Add missing open_device, hardcode tecpel-dmm-8061-ser for now.
authorUwe Hermann <redacted>
Wed, 1 May 2013 21:29:56 +0000 (23:29 +0200)
committerUwe Hermann <redacted>
Wed, 1 May 2013 21:29:56 +0000 (23:29 +0200)
sigrok-meter

index 289d25c6dd97d8b1b1b7b190c634b0ecfdd4427d..aef1f27aaa2cf225b5f08db758f581bd94a38517 100755 (executable)
@@ -41,20 +41,22 @@ def init_and_run(queue):
             elif QuantityFlag.DC in mqflags:
                 mqflags_str = " DC"
             for i in range(packet.payload.num_samples):
-                dev = "%s" % device.vendor
+                dev = "%s %s" % (device.vendor, device.model)
                 val = "%f%s%s" % (data[i], unit_str, mqflags_str)
                 queue.put((dev, val))
 
     # log = Log()
     # log.level = LogLevel.SPEW
     context = Context()
-    drivers_to_use = ['voltcraft-vc820', 'victor-dmm']
+    drivers_to_use = ['tecpel-dmm-8061-ser']
     drivers = [context.drivers[d] for d in drivers_to_use]
-    devices = [d.scan()[0] for d in drivers]
-    for dev in devices:
-        dev.limit_samples = 1000
+    devices = [d.scan(conn="/dev/ttyUSB0")[0] for d in drivers]
+    # devices = [d.scan()[0] for d in drivers]
+    # for dev in devices:
+    #     dev.limit_samples = 1000
     session = Session(context)
     for dev in devices:
+        session.open_device(dev)
         session.add_device(dev)
     session.add_callback(datafeed_in)
     session.start()