commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10564 - in gnuradio/branches/developers/jblum/gui_gut


From: jblum
Subject: [Commit-gnuradio] r10564 - in gnuradio/branches/developers/jblum/gui_guts: gr-wxgui/src/python grc/data/platforms/python grc/data/platforms/python/blocks
Date: Thu, 5 Mar 2009 17:53:29 -0700 (MST)

Author: jblum
Date: 2009-03-05 17:53:29 -0700 (Thu, 05 Mar 2009)
New Revision: 10564

Added:
   
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_histosink2.xml
Modified:
   
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/constsink_gl.py
   
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scopesink_gl.py
   
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/block_tree.xml
   
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/Makefile.am
   
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
Log:
WIP grc block for histosink

Modified: 
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/constsink_gl.py
===================================================================
--- 
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/constsink_gl.py 
    2009-03-06 00:23:21 UTC (rev 10563)
+++ 
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/constsink_gl.py 
    2009-03-06 00:53:29 UTC (rev 10564)
@@ -97,8 +97,7 @@
                #connect
                self.connect(self, self._costas, self._retime, agc, sd, sink)
                #controller
-               def setter(p, k, x): # lambdas can't have assignments :(
-                   p[k] = x
+               def setter(p, k, x): p[k] = x
                self.controller = pubsub()
                self.controller.subscribe(ALPHA_KEY, self._costas.set_alpha)
                self.controller.publish(ALPHA_KEY, self._costas.alpha)

Modified: 
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scopesink_gl.py
===================================================================
--- 
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scopesink_gl.py 
    2009-03-06 00:23:21 UTC (rev 10563)
+++ 
gnuradio/branches/developers/jblum/gui_guts/gr-wxgui/src/python/scopesink_gl.py 
    2009-03-06 00:53:29 UTC (rev 10564)
@@ -145,11 +145,6 @@
                        msg_key=MSG_KEY,
                )
                common.register_access_methods(self, self.win)
-               #backwards compadibility
-               def setter(x, y, z): x[y] = z
-               self.win.set_format_line = lambda: setter(self.win, MARKER_KEY, 
None)
-               self.win.set_format_dot = lambda: setter(self.win, MARKER_KEY, 
2.0)
-               self.win.set_format_plus =  lambda: setter(self.win, 
MARKER_KEY, 3.0)
 
 class scope_sink_f(_scope_sink_base):
        _item_size = gr.sizeof_float

Modified: 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/block_tree.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/block_tree.xml
        2009-03-06 00:23:21 UTC (rev 10563)
+++ 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/block_tree.xml
        2009-03-06 00:53:29 UTC (rev 10564)
@@ -38,6 +38,7 @@
                <block>wxgui_fftsink2</block>
                <block>wxgui_constellationsink2</block>
                <block>wxgui_waterfallsink2</block>
+               <block>wxgui_histosink2</block>
        </cat>
        <cat>
                <name>Operators</name>

Modified: 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/Makefile.am
    2009-03-06 00:23:21 UTC (rev 10563)
+++ 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/Makefile.am
    2009-03-06 00:53:29 UTC (rev 10564)
@@ -208,6 +208,7 @@
        variable_text_box.xml \
        wxgui_constellationsink2.xml \
        wxgui_fftsink2.xml \
+       wxgui_histosink2.xml \
        wxgui_numbersink2.xml \
        wxgui_scopesink2.xml \
        wxgui_waterfallsink2.xml \

Added: 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_histosink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_histosink2.xml
                           (rev 0)
+++ 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_histosink2.xml
   2009-03-06 00:53:29 UTC (rev 10564)
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Histogram Sink
+###################################################
+ -->
+<block>
+       <name>Histo Sink</name>
+       <key>wxgui_histosink2</key>
+       <import>from gnuradio.wxgui import histosink_gl</import>
+       <make>histosink_gl.histo_sink_f(
+       self.GetWin(),
+       title=$title,
+       minimum=$minimum,
+       maximum=$maximum,
+       num_bins=$num_bins,
+       frame_size=$frame_size,
+)
+#set $grid_pos = $grid_pos.eval
+#if not grid_pos
+self.Add(self.$(id).win)
+#else
+self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], 
$grid_pos[3])
+#end if</make>
+       <callback>set_minimum($minimum)</callback>
+       <callback>set_maximum($maximum)</callback>
+       <callback>set_num_bins($num_bins)</callback>
+       <callback>set_frame_size($frame_size)</callback>
+       <param>
+               <name>Title</name>
+               <key>title</key>
+               <value>Histogram Plot</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Minimum</name>
+               <key>minimum</key>
+               <value>-1</value>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Maximum</name>
+               <key>maximum</key>
+               <value>1</value>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Num Bins</name>
+               <key>num_bins</key>
+               <value>27</value>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Frame Size</name>
+               <key>frame_size</key>
+               <value>1000</value>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Grid Position</name>
+               <key>grid_pos</key>
+               <value></value>
+               <type>grid_pos</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>float</type>
+       </sink>
+       <doc>
+Use the Grid Position (row, column, row span, column span) to position the 
graphical element in the window.
+       </doc>
+</block>

Modified: 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
   2009-03-06 00:23:21 UTC (rev 10563)
+++ 
gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
   2009-03-06 00:53:29 UTC (rev 10564)
@@ -18,16 +18,12 @@
        t_scale=$t_scale,
        num_inputs=$num_inputs,
 )
-self.$(id).win.$(marker)()
 #set $grid_pos = $grid_pos.eval
 #if not grid_pos
 self.Add(self.$(id).win)
 #else
 self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], 
$grid_pos[3])
 #end if</make>
-<!--
-$(id).win.info.scopesink.set_trigger_channel($(trigger_channel))
-$(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) -->
        <callback>set_sample_rate($samp_rate)</callback>
        <param>
                <name>Type</name>
@@ -76,48 +72,6 @@
                <type>real</type>
        </param>
        <param>
-               <name>Marker</name>
-               <key>marker</key>
-               <value>set_format_line</value>
-               <type>enum</type>
-               <option>
-                       <name>Line</name>
-                       <key>set_format_line</key>
-               </option>
-               <option>
-                       <name>Dot</name>
-                       <key>set_format_dot</key>
-               </option>
-               <option>
-                       <name>Plus</name>
-                       <key>set_format_plus</key>
-               </option>
-       </param>
-       <!-- <param>
-               <name>Trigger Channel</name>
-               <key>trigger_channel</key>
-               <value>0</value>
-               <type>int</type>
-       </param>
-       <param>
-               <name>Trigger Mode</name>
-               <key>trigger_mode</key>
-               <value>gr_TRIG_AUTO</value>
-               <type>enum</type>
-               <option>
-                       <name>Auto</name>
-                       <key>gr_TRIG_AUTO</key>
-               </option>
-               <option>
-                       <name>Positive Slope</name>
-                       <key>gr_TRIG_POS_SLOPE</key>
-               </option>
-               <option>
-                       <name>Negative Slope</name>
-                       <key>gr_TRIG_NEG_SLOPE</key>
-               </option>
-       </param> -->
-       <param>
                <name>Num Inputs</name>
                <key>num_inputs</key>
                <value>1</value>





reply via email to

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