make q3562 app work again (in test mode at least)

Thu, 21 Aug 2008 19:53:22 +0200

author
David Douard <david.douard@logilab.fr>
date
Thu, 21 Aug 2008 19:53:22 +0200
changeset 69
879083ec2355
parent 68
8ec1c26a4a99
child 70
4cd8edd2b4e7

make q3562 app work again (in test mode at least)

pygpibtoolkit/HP3562A/datablockwidget.py file | annotate | diff | comparison | revisions
pygpibtoolkit/HP3562A/dump_datablock_mockup.py file | annotate | diff | comparison | revisions
pygpibtoolkit/HP3562A/q3562A.py file | annotate | diff | comparison | revisions
--- a/pygpibtoolkit/HP3562A/datablockwidget.py	Thu Aug 21 19:52:54 2008 +0200
+++ b/pygpibtoolkit/HP3562A/datablockwidget.py	Thu Aug 21 19:53:22 2008 +0200
@@ -104,8 +104,9 @@
             item = QtGui.QTableWidgetItem()
             item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
             for i, row in enumerate(header_struct):
-                key = row[0]
-                typ = row[1]
+                pname = row[0]
+                key = row[1]
+                typ = row[2]
                 if typ is None:
                     continue
                 val = header.get(key, "N/A")
--- a/pygpibtoolkit/HP3562A/dump_datablock_mockup.py	Thu Aug 21 19:52:54 2008 +0200
+++ b/pygpibtoolkit/HP3562A/dump_datablock_mockup.py	Thu Aug 21 19:53:22 2008 +0200
@@ -38,3 +38,7 @@
             time.sleep(random.randint(1,3))
             return ret
         return None
+
+    def send_command(self, *args):
+        pass
+    
--- a/pygpibtoolkit/HP3562A/q3562A.py	Thu Aug 21 19:52:54 2008 +0200
+++ b/pygpibtoolkit/HP3562A/q3562A.py	Thu Aug 21 19:53:22 2008 +0200
@@ -353,11 +353,13 @@
             self.gpib_dumper = HP3562dumper(device=self._prefs.device,
                                             address=self._prefs.address,
                                             )
-            self.captureThread = GPIBReceiver(self.gpib_dumper)
+            self.captureThread = GPIBConnection(self.gpib_dumper)
             self.connect(self.captureThread, SIGNAL('datablockDumped(const QByteArray)'),
                          self.datablockReceived)
             self.captureThread.start()
         except Exception, e:
+            print "ERROR: cannot initialize GPIB"
+            print e
             self.gpib_plotter = None
 
     def datablockReceived(self, datablock):

mercurial