discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Revised scopesink.py for Mac OS X


From: Jonathan P Jacky
Subject: [Discuss-gnuradio] Revised scopesink.py for Mac OS X
Date: Thu, 28 Jul 2005 10:31:57 -0700 (PDT)


Attached is scopesink-nscans.py, a version of scopesink.py from CVS
(on May 11) that I revised so it will run on Mac OS X.  These changes are
in addition to the ones described by Eric in

 http://lists.gnu.org/archive/html/discuss-gnuradio/2005-05/msg00137.html

The unrevised scopesink.py does not quite work on my Mac, a 1 GHz
PowerBook G4. It draws the scope panel with control buttons but the
scope face remains blank with no traces shown; instead it displays the
spinning beach ball that OS X uses to indicate that the program is
busy.  The panel buttons are unresponsive; the only way to exit is to
type ^C in the terminal window.  It appears that wxgui on my Mac is
too slow to display the traces at the rate required by the example
flow graph in scopesink.py.  Experiments and workarounds are described in
http://lists.gnu.org/archive/html/discuss-gnuradio/2005-05/msg00290.html
The unrevised scopesink.py does work on my Linux system (Fedora Core 3), a
1.6 GHz Pentium M "Centrino".

In the revised scopesink-nscans.py here, the flow graph processes all
data but wxgui processes only one out of nscans buffers (and discards
the rest).  This allows the flow graph to run at full speed without
overloading the wxgui graphics.  Just set nscans as large as needed so
the scope traces appear.  nscans is assigned from argv[1], the first
command line argument; it defaults to 1 if no argv[1] is given.
nscans >= 2 is needed on my Mac (so the scope displays only every
other buffer processed by the flow graph, still a satisfactory refresh
rate to my eyes).  The default nscans == 1 works fine on my Linux system.

The only differences (other than comments) from the unrevised
scopesink.py are the new global variable nscans, a few lines in the
input_watcher class (to display only one out of nscans traces) and a
line in the test_app_flow_graph class (to assign nscans from argv[1]).

If these revisions were included in the scopesink.py in CVS, we could
use the same version for Linux and Mac OS X (and possibly other
platforms where wxgui performance is an issue).  If the command line
argument is omitted, this version works just like the unrevised
version.

Jon Jacky


Attachment: scopesink-nscans.py
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]