fix small bugs in qgpib plotter

Fri, 05 Sep 2008 00:23:55 +0200

author
David Douard <david.douard@logilab.fr>
date
Fri, 05 Sep 2008 00:23:55 +0200
changeset 77
1e539617d6ac
parent 76
baab64c18885
child 78
b73a9d9e45ec

fix small bugs in qgpib plotter

pygpibtoolkit/plotter/gpib_plotter.py file | annotate | diff | comparison | revisions
pygpibtoolkit/prologix.py file | annotate | diff | comparison | revisions
--- a/pygpibtoolkit/plotter/gpib_plotter.py	Tue Aug 26 23:22:38 2008 +0200
+++ b/pygpibtoolkit/plotter/gpib_plotter.py	Fri Sep 05 00:23:55 2008 +0200
@@ -58,7 +58,7 @@
         newdata = False
         while i<self._retries:
             l = self._cnx.readline().strip()
-            if firstloop:
+            if l and firstloop:
                 self._cnx.timeout = self._timeout
                 firstloop = False
                 self.plotStarted()
@@ -77,8 +77,8 @@
                     #time.sleep(0.1)
                 i += 1
             else:
-                if not res:
-                    print "Plotting..."
+                #if not res:
+                #    print "Plotting..."
                 res += l + '\n'
                 i = 0
                 #time.sleep(0.1)
--- a/pygpibtoolkit/prologix.py	Tue Aug 26 23:22:38 2008 +0200
+++ b/pygpibtoolkit/prologix.py	Fri Sep 05 00:23:55 2008 +0200
@@ -43,9 +43,10 @@
             res = self._cnx.readlines()
             if res: # empty evetual read buffer
                 print "there where pending stuffs in buffer", repr(res)
-            self.set_mode(mode)
+            self.set_mode(1)
             self.set_address(address)
             self._set_cmd('auto', 0)
+            self.set_mode(mode)
         except Exception, e:
             print "Humm, something went wrong", e
             

mercurial