summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/blocks/Makefile.am2
-rw-r--r--grc/blocks/block_tree.xml2
-rw-r--r--grc/blocks/gr_agc2_xx.xml5
-rw-r--r--grc/blocks/gr_and_const_xx.xml48
-rw-r--r--grc/blocks/gr_dd_mpsk_sync_cc.xml65
-rw-r--r--grc/blocks/gr_file_sink.xml19
-rw-r--r--grc/blocks/gr_udp_sink.xml32
-rw-r--r--grc/blocks/gr_udp_source.xml20
-rw-r--r--grc/blocks/usrp2_sink_xxxx.xml21
-rw-r--r--grc/blocks/usrp2_source_xxxx.xml21
-rw-r--r--grc/blocks/variable_config.xml2
-rw-r--r--grc/blocks/wxgui_scopesink2.xml22
-rw-r--r--grc/freedesktop/Makefile.am10
-rw-r--r--grc/freedesktop/gnuradio-grc.desktop2
-rw-r--r--grc/freedesktop/grc_setup_freedesktop.in29
-rw-r--r--grc/python/Block.py74
-rw-r--r--grc/python/Port.py2
-rw-r--r--grc/scripts/Makefile.am4
-rwxr-xr-xgrc/scripts/gnuradio-companion (renamed from grc/scripts/grc)0
19 files changed, 238 insertions, 142 deletions
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
index 4e3839d27..18420a013 100644
--- a/grc/blocks/Makefile.am
+++ b/grc/blocks/Makefile.am
@@ -71,6 +71,7 @@ dist_ourdata_DATA = \
gr_agc2_xx.xml \
gr_agc_xx.xml \
gr_and_xx.xml \
+ gr_and_const_xx.xml \
gr_argmax_xx.xml \
gr_binary_slicer_fb.xml \
gr_channel_model.xml \
@@ -91,7 +92,6 @@ dist_ourdata_DATA = \
gr_correlate_access_code_bb.xml \
gr_costas_loop_cc.xml \
gr_cpfsk_bc.xml \
- gr_dd_mpsk_sync_cc.xml \
gr_decode_ccsds_27_fb.xml \
gr_deinterleave.xml \
gr_delay.xml \
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 04568e19a..610a88102 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -58,6 +58,7 @@
<block>gr_add_const_vxx</block>
<block>gr_multiply_const_vxx</block>
+ <block>gr_and_const_xx</block>
<block>gr_not_xx</block>
<block>gr_and_xx</block>
@@ -130,7 +131,6 @@
<block>gr_pfb_clock_sync_xxx</block>
<block>gr_costas_loop_cc</block>
- <block>gr_dd_mpsk_sync_cc</block>
<block>gr_mpsk_sync_cc</block>
<block>gr_mpsk_receiver_cc</block>
diff --git a/grc/blocks/gr_agc2_xx.xml b/grc/blocks/gr_agc2_xx.xml
index fb3ae5704..55b20d4e8 100644
--- a/grc/blocks/gr_agc2_xx.xml
+++ b/grc/blocks/gr_agc2_xx.xml
@@ -9,6 +9,11 @@
<key>gr_agc2_xx</key>
<import>from gnuradio import gr</import>
<make>gr.agc2_$(type.fcn)($attack_rate, $decay_rate, $reference, $gain, $max_gain)</make>
+ <callback>set_attack_rate($attack_rate)</callback>
+ <callback>set_decay_rate($decay_rate)</callback>
+ <callback>set_reference($reference)</callback>
+ <callback>set_gain($gain)</callback>
+ <callback>set_max_gain($max_gain)</callback>
<param>
<name>Type</name>
<key>type</key>
diff --git a/grc/blocks/gr_and_const_xx.xml b/grc/blocks/gr_and_const_xx.xml
new file mode 100644
index 000000000..dc9649311
--- /dev/null
+++ b/grc/blocks/gr_and_const_xx.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## And Const Block:
+## all types, 1 output, 1 input & const
+###################################################
+ -->
+<block>
+ <name>And Const</name>
+ <key>gr_and_const_xx</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.and_const_$(type.fcn)($const)</make>
+ <callback>set_k($const)</callback>
+ <param>
+ <name>IO Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>fcn:ii</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>fcn:ss</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>fcn:bb</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constant</name>
+ <key>const</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ </source>
+</block>
diff --git a/grc/blocks/gr_dd_mpsk_sync_cc.xml b/grc/blocks/gr_dd_mpsk_sync_cc.xml
deleted file mode 100644
index aed0e8d31..000000000
--- a/grc/blocks/gr_dd_mpsk_sync_cc.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##DD MPSK Sync
-###################################################
- -->
-<block>
- <name>DD MPSK Sync</name>
- <key>gr_dd_mpsk_sync_cc</key>
- <import>from gnuradio import gr</import>
- <make>gr.dd_mpsk_sync_cc($alpha, $beta, $max_freq, $min_freq, $ref_phase, $omega, $gain_omega, $mu, $gain_mu)</make>
- <param>
- <name>Alpha</name>
- <key>alpha</key>
- <type>real</type>
- </param>
- <param>
- <name>Beta</name>
- <key>beta</key>
- <type>real</type>
- </param>
- <param>
- <name>Max Freq</name>
- <key>max_freq</key>
- <type>real</type>
- </param>
- <param>
- <name>Min Freq</name>
- <key>min_freq</key>
- <type>real</type>
- </param>
- <param>
- <name>Reference Phase</name>
- <key>ref_phase</key>
- <type>real</type>
- </param>
- <param>
- <name>Omega</name>
- <key>omega</key>
- <type>real</type>
- </param>
- <param>
- <name>Gain Omega</name>
- <key>gain_omega</key>
- <type>real</type>
- </param>
- <param>
- <name>Mu</name>
- <key>mu</key>
- <type>real</type>
- </param>
- <param>
- <name>Gain Mu</name>
- <key>gain_mu</key>
- <type>real</type>
- </param>
- <sink>
- <name>in</name>
- <type>complex</type>
- </sink>
- <source>
- <name>out</name>
- <type>complex</type>
- </source>
-</block>
diff --git a/grc/blocks/gr_file_sink.xml b/grc/blocks/gr_file_sink.xml
index 880dc2759..0081c93f8 100644
--- a/grc/blocks/gr_file_sink.xml
+++ b/grc/blocks/gr_file_sink.xml
@@ -8,7 +8,9 @@
<name>File Sink</name>
<key>gr_file_sink</key>
<import>from gnuradio import gr</import>
- <make>gr.file_sink($type.size*$vlen, $file)</make>
+ <make>gr.file_sink($type.size*$vlen, $file)
+self.$(id).set_unbuffered($unbuffered)</make>
+ <callback>set_unbuffered($unbuffered)</callback>
<param>
<name>File</name>
<key>file</key>
@@ -51,6 +53,21 @@
<value>1</value>
<type>int</type>
</param>
+ <param>
+ <name>Unbuffered</name>
+ <key>unbuffered</key>
+ <value>False</value>
+ <type>bool</type>
+ <option>
+ <name>Off</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>On</name>
+ <key>True</key>
+ </option>
+ </param>
+
<check>$vlen &gt; 0</check>
<sink>
<name>in</name>
diff --git a/grc/blocks/gr_udp_sink.xml b/grc/blocks/gr_udp_sink.xml
index e9f6c2be8..45f81075f 100644
--- a/grc/blocks/gr_udp_sink.xml
+++ b/grc/blocks/gr_udp_sink.xml
@@ -8,7 +8,7 @@
<name>UDP Sink</name>
<key>gr_udp_sink</key>
<import>from gnuradio import gr</import>
- <make>gr.udp_sink($type.size*$vlen, $ipaddr_local, $port_local, $ipaddr_remote, $port_remote, $mtu)</make>
+ <make>gr.udp_sink($type.size*$vlen, $ipaddr, $port, $psize, $eof)</make>
<callback>set_mtu($mtu)</callback>
<param>
<name>Input Type</name>
@@ -41,34 +41,26 @@
</option>
</param>
<param>
- <name>Local IP Address</name>
- <key>ipaddr_local</key>
- <value>127.0.0.1</value>
+ <name>Destination IP Address</name>
+ <key>ipaddr</key>
<type>string</type>
</param>
<param>
- <name>Local Port</name>
- <key>port_local</key>
- <value>0</value>
+ <name>Destination Port</name>
+ <key>port</key>
<type>int</type>
</param>
<param>
- <name>Remote IP Address</name>
- <key>ipaddr_remote</key>
- <value>127.0.0.1</value>
- <type>string</type>
- </param>
- <param>
- <name>Remote Port</name>
- <key>port_remote</key>
- <value>1234</value>
+ <name>Payload Size</name>
+ <key>psize</key>
+ <value>1472</value>
<type>int</type>
</param>
<param>
- <name>MTU</name>
- <key>mtu</key>
- <value>1024</value>
- <type>int</type>
+ <name>Send Null Pkt as EOF</name>
+ <key>eof</key>
+ <value>True</value>
+ <type>bool</type>
</param>
<param>
<name>Vec Length</name>
diff --git a/grc/blocks/gr_udp_source.xml b/grc/blocks/gr_udp_source.xml
index f03adf802..a1b961651 100644
--- a/grc/blocks/gr_udp_source.xml
+++ b/grc/blocks/gr_udp_source.xml
@@ -8,7 +8,7 @@
<name>UDP Source</name>
<key>gr_udp_source</key>
<import>from gnuradio import gr</import>
- <make>gr.udp_source($type.size*$vlen, $ipaddr, $port, $mtu)</make>
+ <make>gr.udp_source($type.size*$vlen, $ipaddr, $port, $psize, $eof, $wait)</make>
<callback>set_mtu($mtu)</callback>
<param>
<name>Output Type</name>
@@ -53,12 +53,24 @@
<type>int</type>
</param>
<param>
- <name>MTU</name>
- <key>mtu</key>
- <value>1024</value>
+ <name>Payload Size</name>
+ <key>psize</key>
+ <value>1472</value>
<type>int</type>
</param>
<param>
+ <name>Null Pkt is EOF</name>
+ <key>eof</key>
+ <value>True</value>
+ <type>bool</type>
+ </param>
+ <param>
+ <name>Wait for Data</name>
+ <key>wait</key>
+ <value>True</value>
+ <type>bool</type>
+ </param>
+ <param>
<name>Vec Length</name>
<key>vlen</key>
<value>1</value>
diff --git a/grc/blocks/usrp2_sink_xxxx.xml b/grc/blocks/usrp2_sink_xxxx.xml
index 14586cc36..f9fb25361 100644
--- a/grc/blocks/usrp2_sink_xxxx.xml
+++ b/grc/blocks/usrp2_sink_xxxx.xml
@@ -21,7 +21,8 @@ self.$(id).set_interp($interpolation)
self.$(id).set_lo_offset($lo_offset)
#end if
self.$(id).set_center_freq($frequency)
-self.$(id).set_gain($gain)</make>
+self.$(id).set_gain($gain)
+self.$(id).config_mimo($usrp2_clock_src)</make>
<callback>set_interp($interpolation)</callback>
<callback>#if $lo_offset() != float('inf')
self.$(id).set_lo_offset($lo_offset)
@@ -84,6 +85,24 @@ self.$(id).set_center_freq($frequency)</callback>
<value>0</value>
<type>real</type>
</param>
+ <param>
+ <name>Clock Source</name>
+ <key>usrp2_clock_src</key>
+ <value>usrp2.MC_WE_DONT_LOCK</value>
+ <type>enum</type>
+ <option>
+ <name>Internal</name>
+ <key>usrp2.MC_WE_DONT_LOCK</key>
+ </option>
+ <option>
+ <name>External SMA</name>
+ <key>usrp2.MC_WE_LOCK_TO_SMA</key>
+ </option>
+ <option>
+ <name>External MIMO</name>
+ <key>usrp2.MC_WE_LOCK_TO_MIMO</key>
+ </option>
+ </param>
<sink>
<name>in</name>
<type>$type</type>
diff --git a/grc/blocks/usrp2_source_xxxx.xml b/grc/blocks/usrp2_source_xxxx.xml
index 0f297dfd1..584199798 100644
--- a/grc/blocks/usrp2_source_xxxx.xml
+++ b/grc/blocks/usrp2_source_xxxx.xml
@@ -21,7 +21,8 @@ self.$(id).set_decim($decimation)
self.$(id).set_lo_offset($lo_offset)
#end if
self.$(id).set_center_freq($frequency)
-self.$(id).set_gain($gain)</make>
+self.$(id).set_gain($gain)
+self.$(id).config_mimo($usrp2_clock_src)</make>
<callback>set_decim($decimation)</callback>
<callback>#if $lo_offset() != float('inf')
self.$(id).set_lo_offset($lo_offset)
@@ -84,6 +85,24 @@ self.$(id).set_center_freq($frequency)</callback>
<value>0</value>
<type>real</type>
</param>
+ <param>
+ <name>Clock Source</name>
+ <key>usrp2_clock_src</key>
+ <value>usrp2.MC_WE_DONT_LOCK</value>
+ <type>enum</type>
+ <option>
+ <name>Internal</name>
+ <key>usrp2.MC_WE_DONT_LOCK</key>
+ </option>
+ <option>
+ <name>External SMA</name>
+ <key>usrp2.MC_WE_LOCK_TO_SMA</key>
+ </option>
+ <option>
+ <name>External MIMO</name>
+ <key>usrp2.MC_WE_LOCK_TO_MIMO</key>
+ </option>
+ </param>
<source>
<name>out</name>
<type>$type</type>
diff --git a/grc/blocks/variable_config.xml b/grc/blocks/variable_config.xml
index 1c815c347..11bff9edc 100644
--- a/grc/blocks/variable_config.xml
+++ b/grc/blocks/variable_config.xml
@@ -46,7 +46,7 @@ self._$(id)_config.write(open($config_file, 'w'))</callback>
<option>
<name>Bool</name>
<key>bool</key>
- <opt>get:getbool</opt>
+ <opt>get:getboolean</opt>
</option>
<option>
<name>String</name>
diff --git a/grc/blocks/wxgui_scopesink2.xml b/grc/blocks/wxgui_scopesink2.xml
index eba45f489..50cd977be 100644
--- a/grc/blocks/wxgui_scopesink2.xml
+++ b/grc/blocks/wxgui_scopesink2.xml
@@ -20,6 +20,7 @@ scopesink2.$(type.fcn)(
ac_couple=$ac_couple,
xy_mode=$xy_mode,
num_inputs=$num_inputs,
+ trig_mode=$trig_mode,
#if $win_size()
size=$win_size,
#end if
@@ -134,6 +135,27 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
<value></value>
<type>notebook</type>
</param>
+ <param>
+ <name>Trigger Mode</name>
+ <key>trig_mode</key>
+ <type>enum</type>
+ <option>
+ <name>Auto</name>
+ <key>gr.gr_TRIG_MODE_AUTO</key>
+ </option>
+ <option>
+ <name>Normal</name>
+ <key>gr.gr_TRIG_MODE_NORM</key>
+ </option>
+ <option>
+ <name>Freerun</name>
+ <key>gr.gr_TRIG_MODE_FREE</key>
+ </option>
+ <option>
+ <name>Stripchart</name>
+ <key>gr.gr_TRIG_MODE_STRIPCHART</key>
+ </option>
+ </param>
<check>not $win_size or len($win_size) == 2</check>
<check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
<sink>
diff --git a/grc/freedesktop/Makefile.am b/grc/freedesktop/Makefile.am
index bfbdee940..f6aa97a93 100644
--- a/grc/freedesktop/Makefile.am
+++ b/grc/freedesktop/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008,2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,7 +22,6 @@
include $(top_srcdir)/Makefile.common
ourdatadir = $(pkgdatadir)/grc/freedesktop
-
dist_ourdata_DATA = \
grc-icon-256.png \
grc-icon-128.png \
@@ -34,7 +33,8 @@ dist_ourdata_DATA = \
gnuradio-usrp2_probe.desktop \
gnuradio-usrp_probe.desktop
-dist_bin_SCRIPTS = grc_setup_freedesktop
+pkglibexecdir = $(libexecdir)/$(PACKAGE)
+dist_pkglibexec_SCRIPTS = grc_setup_freedesktop
grc_setup_freedesktop: $(srcdir)/grc_setup_freedesktop.in Makefile
sed -e 's|@SRCDIR[@]|$(ourdatadir)|g' $< > $@
@@ -46,10 +46,10 @@ install-data-hook:
@printf "\n*** GRC Post-Install Message ***\
\nTo install icons, mime type, and menu items\
\nfor a freedesktop.org system (Gnome/KDE/Xfce):\
- \n >>> sudo grc_setup_freedesktop install\n\n"
+ \n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop install\n\n"
uninstall-hook:
@printf "\n*** GRC Post-Uninstall Message ***\
\nTo uninstall icons, mime type, and menu items\
\nfor a freedesktop.org system (Gnome/KDE/Xfce):\
- \n >>> sudo grc_setup_freedesktop uninstall\n\n"
+ \n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop uninstall\n\n"
diff --git a/grc/freedesktop/gnuradio-grc.desktop b/grc/freedesktop/gnuradio-grc.desktop
index d9c70ca92..5fd049780 100644
--- a/grc/freedesktop/gnuradio-grc.desktop
+++ b/grc/freedesktop/gnuradio-grc.desktop
@@ -2,7 +2,7 @@
Version=1.0
Type=Application
Name=GRC
-Exec=grc %F
+Exec=gnuradio-companion %F
Categories=Development;
MimeType=application/gnuradio-grc;
Icon=gnuradio-grc
diff --git a/grc/freedesktop/grc_setup_freedesktop.in b/grc/freedesktop/grc_setup_freedesktop.in
index db6506452..ab4ce82ef 100644
--- a/grc/freedesktop/grc_setup_freedesktop.in
+++ b/grc/freedesktop/grc_setup_freedesktop.in
@@ -1,4 +1,24 @@
#!/bin/bash
+#
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
##################################################
# setup grc on a freedesktop platform
# $1 should be install or uninstall
@@ -39,11 +59,12 @@ case "$1" in
echo "Begin freedesktop uninstall..."
for size in ${ICON_SIZES}; do \
echo "Uninstall icon: ${size}x${size}"
- xdg-icon-resource uninstall --context mimetypes --theme gnome --size ${size} application-gnuradio-grc; \
- xdg-icon-resource uninstall --context mimetypes --size ${size} application-gnuradio-grc; \
- xdg-icon-resource uninstall --context apps --theme gnome --size ${size} gnuradio-grc; \
- xdg-icon-resource uninstall --context apps --size ${size} gnuradio-grc; \
+ xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome --size ${size} application-gnuradio-grc; \
+ xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} application-gnuradio-grc; \
+ xdg-icon-resource uninstall --noupdate --context apps --theme gnome --size ${size} gnuradio-grc; \
+ xdg-icon-resource uninstall --noupdate --context apps --size ${size} gnuradio-grc; \
done
+ xdg-icon-resource forceupdate
echo "Uninstall mime type"
xdg-mime uninstall ${SRCDIR}/gnuradio-grc.xml
echo "Uninstall menu items"
diff --git a/grc/python/Block.py b/grc/python/Block.py
index dd39b095d..bd03eb5cd 100644
--- a/grc/python/Block.py
+++ b/grc/python/Block.py
@@ -75,42 +75,48 @@ class Block(_Block, _GUIBlock):
Add and remove ports to adjust for the nports.
"""
_Block.rewrite(self)
+
+ def insert_port(get_ports, get_port, key):
+ prev_port = get_port(str(int(key)-1))
+ get_ports().insert(
+ get_ports().index(prev_port)+1,
+ prev_port.copy(new_key=key),
+ )
+ #restore integer contiguity after insertion
+ for i, port in enumerate(get_ports()): port._key = str(i)
+
+ def remove_port(get_ports, get_port, key):
+ port = get_port(key)
+ for connection in port.get_connections():
+ self.get_parent().remove_element(connection)
+ get_ports().remove(port)
+ #restore integer contiguity after insertion
+ for i, port in enumerate(get_ports()): port._key = str(i)
+
#adjust nports
for get_ports, get_port in (
(self.get_sources, self.get_source),
(self.get_sinks, self.get_sink),
):
- #how many streaming (non-message) ports?
- num_ports = len(filter(lambda p: p.get_type() != 'msg', get_ports()))
- #do nothing for 0 ports
- if not num_ports: continue
- #get the nports setting
- port0 = get_port(str(0))
- nports = port0.get_nports()
- #do nothing for no nports
- if not nports: continue
- #do nothing if nports is already num ports
- if nports == num_ports: continue
- #remove excess ports and connections
- if nports < num_ports:
- #remove the connections
- for key in map(str, range(nports, num_ports)):
- port = get_port(key)
- for connection in port.get_connections():
- self.get_parent().remove_element(connection)
- #remove the ports
- for key in map(str, range(nports, num_ports)):
- get_ports().remove(get_port(key))
- continue
- #add more ports
- if nports > num_ports:
- for key in map(str, range(num_ports, nports)):
- prev_port = get_port(str(int(key)-1))
- get_ports().insert(
- get_ports().index(prev_port)+1,
- prev_port.copy(new_key=key),
- )
- continue
+ master_ports = filter(lambda p: p.get_nports(), get_ports())
+ for i, master_port in enumerate(master_ports):
+ nports = master_port.get_nports()
+ index_first = get_ports().index(master_port)
+ try: index_last = get_ports().index(master_ports[i+1])
+ except IndexError: index_last = len(get_ports())
+ num_ports = index_last - index_first
+ #do nothing if nports is already num ports
+ if nports == num_ports: continue
+ #remove excess ports and connections
+ if nports < num_ports:
+ for key in map(str, range(index_first+nports, index_first+num_ports)):
+ remove_port(get_ports, get_port, key)
+ continue
+ #add more ports
+ if nports > num_ports:
+ for key in map(str, range(index_first+num_ports, index_first+nports)):
+ insert_port(get_ports, get_port, key)
+ continue
def port_controller_modify(self, direction):
"""
@@ -119,10 +125,8 @@ class Block(_Block, _GUIBlock):
@return true for change
"""
changed = False
- #concat the nports string from the private nports settings of both port0
- nports_str = \
- (self.get_sinks() and self.get_sinks()[0]._nports or '') + \
- (self.get_sources() and self.get_sources()[0]._nports or '')
+ #concat the nports string from the private nports settings of all ports
+ nports_str = ' '.join([port._nports for port in self.get_ports()])
#modify all params whose keys appear in the nports string
for param in self.get_params():
if param.is_enum() or param.get_key() not in nports_str: continue
diff --git a/grc/python/Port.py b/grc/python/Port.py
index 6965371df..6e5a5c59f 100644
--- a/grc/python/Port.py
+++ b/grc/python/Port.py
@@ -167,5 +167,7 @@ class Port(_Port, _GUIPort):
def copy(self, new_key=None):
n = self._n.copy()
+ #remove nports from the key so the copy cannot be a duplicator
+ if n.has_key('nports'): n.pop('nports')
if new_key: n['key'] = new_key
return self.__class__(self.get_parent(), n, self._dir)
diff --git a/grc/scripts/Makefile.am b/grc/scripts/Makefile.am
index e24f88800..9019ec5cc 100644
--- a/grc/scripts/Makefile.am
+++ b/grc/scripts/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,4 +21,4 @@
include $(top_srcdir)/Makefile.common
-dist_bin_SCRIPTS = grc usrp2_probe usrp_probe
+dist_bin_SCRIPTS = gnuradio-companion usrp2_probe usrp_probe
diff --git a/grc/scripts/grc b/grc/scripts/gnuradio-companion
index a4115c39f..a4115c39f 100755
--- a/grc/scripts/grc
+++ b/grc/scripts/gnuradio-companion