# HG changeset patch # User David Douard # Date 1219341202 -7200 # Node ID 879083ec235559b909525ef6cd8ae99bfb2a6d8a # Parent 8ec1c26a4a9978c84a3dc31d36eeef8bd8257116 make q3562 app work again (in test mode at least) diff -r 8ec1c26a4a99 -r 879083ec2355 pygpibtoolkit/HP3562A/datablockwidget.py --- 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") diff -r 8ec1c26a4a99 -r 879083ec2355 pygpibtoolkit/HP3562A/dump_datablock_mockup.py --- 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 + diff -r 8ec1c26a4a99 -r 879083ec2355 pygpibtoolkit/HP3562A/q3562A.py --- 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):