diff options
author | jcorgan | 2009-03-20 02:16:20 +0000 |
---|---|---|
committer | jcorgan | 2009-03-20 02:16:20 +0000 |
commit | d9744799b7df6c09180778540bf55eb9dc84281b (patch) | |
tree | 311339459f5fae94417321c08b4d48710e03f30e /grc/data/platforms/python | |
parent | 88304ce16a97945d13510b5fdaefcc0f62462d9d (diff) | |
download | gnuradio-d9744799b7df6c09180778540bf55eb9dc84281b.tar.gz gnuradio-d9744799b7df6c09180778540bf55eb9dc84281b.tar.bz2 gnuradio-d9744799b7df6c09180778540bf55eb9dc84281b.zip |
Merged r10463:10658 from jblum/gui_guts into trunk. Trunk passes distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10660 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/data/platforms/python')
7 files changed, 220 insertions, 111 deletions
diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml index bb2d681f0..7e13aaff6 100644 --- a/grc/data/platforms/python/block_tree.xml +++ b/grc/data/platforms/python/block_tree.xml @@ -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> diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am index 6b09050f3..506648d45 100644 --- a/grc/data/platforms/python/blocks/Makefile.am +++ b/grc/data/platforms/python/blocks/Makefile.am @@ -210,6 +210,7 @@ dist_ourdata_DATA = \ variable_text_box.xml \ wxgui_constellationsink2.xml \ wxgui_fftsink2.xml \ + wxgui_histosink2.xml \ wxgui_numbersink2.xml \ wxgui_scopesink2.xml \ wxgui_waterfallsink2.xml \ diff --git a/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml b/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml index cf3f29280..69869904f 100644 --- a/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml +++ b/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml @@ -7,14 +7,22 @@ <block> <name>Constellation Sink</name> <key>wxgui_constellationsink2</key> - <import>from gnuradio.wxgui import scopesink2</import> - <make>scopesink2.constellation_sink( + <import>from gnuradio.wxgui import constsink_gl</import> + <make>constsink_gl.const_sink_c( self.GetWin(), title=$title, sample_rate=$samp_rate, - frame_decim=$frame_decim, + frame_rate=$frame_rate, + const_size=$const_size, + M=$M, + theta=$theta, + alpha=$alpha, + fmax=$fmax, + mu=$mu, + gain_mu=$gain_mu, + symbol_rate=$symbol_rate, + omega_limit=$omega_limit, ) -self.$(id).win.$(marker)() #set $grid_pos = $grid_pos.eval #if not grid_pos self.Add(self.$(id).win) @@ -35,28 +43,64 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos <type>real</type> </param> <param> - <name>Frame Decimation</name> - <key>frame_decim</key> - <value>15</value> + <name>Frame Rate</name> + <key>frame_rate</key> + <value>5</value> + <type>real</type> + </param> + <param> + <name>Constellation Size</name> + <key>const_size</key> + <value>2048</value> + <type>real</type> + </param> + <param> + <name>M</name> + <key>M</key> + <value>4</value> <type>int</type> </param> <param> - <name>Marker</name> - <key>marker</key> - <value>set_format_plus</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> + <name>Theta</name> + <key>theta</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>Alpha</name> + <key>alpha</key> + <value>0.005</value> + <type>real</type> + </param> + <param> + <name>Max Freq</name> + <key>fmax</key> + <value>0.06</value> + <type>real</type> + </param> + <param> + <name>Mu</name> + <key>mu</key> + <value>0.5</value> + <type>real</type> + </param> + <param> + <name>Gain Mu</name> + <key>gain_mu</key> + <value>0.005</value> + <type>real</type> + </param> + <param> + <name>Symbol Rate</name> + <key>symbol_rate</key> + <value>samp_rate/4.</value> + <type>real</type> + </param> + <param> + <name>Omega Limit</name> + <key>omega_limit</key> + <value>0.005</value> + <type>real</type> </param> <param> <name>Grid Position</name> diff --git a/grc/data/platforms/python/blocks/wxgui_fftsink2.xml b/grc/data/platforms/python/blocks/wxgui_fftsink2.xml index 6c6b747b3..c729bea4b 100644 --- a/grc/data/platforms/python/blocks/wxgui_fftsink2.xml +++ b/grc/data/platforms/python/blocks/wxgui_fftsink2.xml @@ -12,7 +12,6 @@ self.GetWin(), baseband_freq=$baseband_freq, y_per_div=$y_per_div, - y_divs=$y_divs, ref_level=$ref_level, sample_rate=$samp_rate, fft_size=$fft_size, @@ -68,16 +67,30 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos <name>Y per Div</name> <key>y_per_div</key> <value>10</value> - <type>real</type> - </param> - <param> - <name>Y Divs</name> - <key>y_divs</key> - <value>8</value> - <type>real</type> + <type>enum</type> + <option> + <name>1 dB</name> + <key>1</key> + </option> + <option> + <name>2 dB</name> + <key>2</key> + </option> + <option> + <name>5 dB</name> + <key>5</key> + </option> + <option> + <name>10 dB</name> + <key>10</key> + </option> + <option> + <name>20 dB</name> + <key>20</key> + </option> </param> <param> - <name>Reference Level</name> + <name>Ref Level (dB)</name> <key>ref_level</key> <value>50</value> <type>real</type> @@ -95,40 +108,43 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos <type>int</type> </param> <param> - <name>Average Alpha</name> - <key>avg_alpha</key> - <value>0</value> - <type>real</type> - </param> - <param> - <name>Average</name> - <key>average</key> + <name>Peak Hold</name> + <key>peak_hold</key> <value>False</value> <type>enum</type> + <hide>#if $peak_hold.eval == 'True' then 'none' else 'part'#</hide> <option> - <name>Yes</name> + <name>On</name> <key>True</key> </option> <option> - <name>No</name> + <name>Off</name> <key>False</key> </option> </param> <param> - <name>Peak Hold</name> - <key>peak_hold</key> + <name>Average</name> + <key>average</key> <value>False</value> <type>enum</type> + <hide>#if $average.eval == 'True' then 'none' else 'part'#</hide> <option> - <name>Yes</name> + <name>On</name> <key>True</key> </option> <option> - <name>No</name> + <name>Off</name> <key>False</key> </option> </param> <param> + <name>Average Alpha</name> + <key>avg_alpha</key> + <value>0</value> + <type>real</type> + <hide>#if $average.eval == 'True' then 'none' else 'all'#</hide> + </param> + <param> <name>Grid Position</name> <key>grid_pos</key> <value></value> diff --git a/grc/data/platforms/python/blocks/wxgui_histosink2.xml b/grc/data/platforms/python/blocks/wxgui_histosink2.xml new file mode 100644 index 000000000..3d694aedc --- /dev/null +++ b/grc/data/platforms/python/blocks/wxgui_histosink2.xml @@ -0,0 +1,56 @@ +<?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, + 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_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>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> diff --git a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml index 3e224228e..1b32993e1 100644 --- a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml +++ b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml @@ -19,10 +19,10 @@ ref_level=$ref_level, sample_rate=$samp_rate, number_rate=$number_rate, - average=$options.average, + average=$average, avg_alpha=#if $avg_alpha.eval then $avg_alpha else 'None'#, label=$title, - peak_hold=$options.peak_hold, + peak_hold=$peak_hold, show_gauge=$show_gauge, ) #set $grid_pos = $grid_pos.eval @@ -108,34 +108,41 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos <type>int</type> </param> <param> - <name>Average Alpha</name> - <key>avg_alpha</key> - <value>0</value> - <type>real</type> - </param> - <param> - <name>Options</name> - <key>options</key> - <value>none</value> + <name>Peak Hold</name> + <key>peak_hold</key> + <value>False</value> <type>enum</type> + <hide>#if $peak_hold.eval == 'True' then 'none' else 'part'#</hide> <option> - <name>None</name> - <key>none</key> - <opt>peak_hold:False</opt> - <opt>average:False</opt> + <name>On</name> + <key>True</key> </option> <option> - <name>Average</name> - <key>average</key> - <opt>peak_hold:False</opt> - <opt>average:True</opt> + <name>Off</name> + <key>False</key> </option> + </param> + <param> + <name>Average</name> + <key>average</key> + <value>False</value> + <type>enum</type> + <hide>#if $average.eval == 'True' then 'none' else 'part'#</hide> <option> - <name>Peak Hold</name> - <key>peak_hold</key> - <opt>peak_hold:True</opt> - <opt>average:False</opt> + <name>On</name> + <key>True</key> </option> + <option> + <name>Off</name> + <key>False</key> + </option> + </param> + <param> + <name>Average Alpha</name> + <key>avg_alpha</key> + <value>0</value> + <type>real</type> + <hide>#if $average.eval == 'True' then 'none' else 'all'#</hide> </param> <param> <name>Show Gauge</name> diff --git a/grc/data/platforms/python/blocks/wxgui_scopesink2.xml b/grc/data/platforms/python/blocks/wxgui_scopesink2.xml index 819a8e9a9..1af0afb35 100644 --- a/grc/data/platforms/python/blocks/wxgui_scopesink2.xml +++ b/grc/data/platforms/python/blocks/wxgui_scopesink2.xml @@ -13,21 +13,18 @@ self.GetWin(), title=$title, sample_rate=$samp_rate, - frame_decim=$frame_decim, - v_scale=#if $v_scale.eval then $v_scale else 'None'#, + v_scale=$v_scale, t_scale=$t_scale, + ac_couple=$ac_couple, + xy_mode=$xy_mode, 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> @@ -58,12 +55,6 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) --> <type>real</type> </param> <param> - <name>Frame Decimation</name> - <key>frame_decim</key> - <value>15</value> - <type>int</type> - </param> - <param> <name>V Scale</name> <key>v_scale</key> <value>0</value> @@ -72,51 +63,39 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) --> <param> <name>T Scale</name> <key>t_scale</key> - <value>.001</value> + <value>0</value> <type>real</type> </param> <param> - <name>Marker</name> - <key>marker</key> - <value>set_format_line</value> + <name>AC Couple</name> + <key>ac_couple</key> + <value>False</value> <type>enum</type> + <hide>#if $ac_couple.eval == 'True' then 'none' else 'part'#</hide> <option> - <name>Line</name> - <key>set_format_line</key> - </option> - <option> - <name>Dot</name> - <key>set_format_dot</key> + <name>Off</name> + <key>False</key> </option> <option> - <name>Plus</name> - <key>set_format_plus</key> + <name>On</name> + <key>True</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> + <name>XY Mode</name> + <key>xy_mode</key> + <value>False</value> <type>enum</type> + <hide>#if $xy_mode.eval == 'True' then 'none' else 'part'#</hide> <option> - <name>Auto</name> - <key>gr_TRIG_AUTO</key> - </option> - <option> - <name>Positive Slope</name> - <key>gr_TRIG_POS_SLOPE</key> + <name>Off</name> + <key>False</key> </option> <option> - <name>Negative Slope</name> - <key>gr_TRIG_NEG_SLOPE</key> + <name>On</name> + <key>True</key> </option> - </param> --> + </param> <param> <name>Num Inputs</name> <key>num_inputs</key> @@ -129,6 +108,7 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) --> <value></value> <type>grid_pos</type> </param> + <check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check> <sink> <name>in</name> <type>$type</type> @@ -137,6 +117,10 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) --> <doc> Set the V Scale to 0 for the scope to auto-scale. +Set the T Scale to 0 for automatic setting. + +XY Mode allows the scope to initialize as an XY plotter. + Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. </doc> </block> |