summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--gr-digital/examples/demod/symbol_sync_test_complex.grc8
-rw-r--r--gr-digital/examples/demod/symbol_sync_test_float.grc12
-rw-r--r--gr-digital/examples/demod/symbol_sync_test_float_ted_gain.m139
-rw-r--r--gr-digital/lib/correlate_access_code_bb_impl.cc7
-rw-r--r--gr-fec/lib/cc_encoder_impl.cc4
-rw-r--r--gr-fft/python/fft/logpwrfft.py4
-rwxr-xr-xgr-qtgui/python/qtgui/range.py.cmakein2
-rw-r--r--grc/CMakeLists.txt6
-rw-r--r--grc/converter/main.py3
-rw-r--r--grc/core/FlowGraph.py16
-rw-r--r--grc/core/generator/hier_block.py4
-rw-r--r--grc/core/utils/flow_graph_complexity.py97
-rw-r--r--grc/gui/Dialogs.py5
-rwxr-xr-xgrc/main.py3
-rwxr-xr-xgrc/scripts/gnuradio-companion6
16 files changed, 227 insertions, 97 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cfe37297e..98ad5ec3b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -222,16 +222,16 @@ IF(MSVC)
IF(MSVC90) #Visual Studio 9
SET(cmake_c_compiler_version "Microsoft Visual Studio 9.0")
SET(cmake_cxx_compiler_version "Microsoft Visual Studio 9.0")
- ELSE(MSVC10) #Visual Studio 10
+ ELSEIF(MSVC10) #Visual Studio 10
SET(cmake_c_compiler_version "Microsoft Visual Studio 10.0")
SET(cmake_cxx_compiler_version "Microsoft Visual Studio 10.0")
- ELSE(MSVC11) #Visual Studio 11
+ ELSEIF(MSVC11) #Visual Studio 11
SET(cmake_c_compiler_version "Microsoft Visual Studio 11.0")
SET(cmake_cxx_compiler_version "Microsoft Visual Studio 11.0")
- ELSE(MSVC12) #Visual Studio 12
+ ELSEIF(MSVC12) #Visual Studio 12
SET(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
SET(cmake_cxx_compiler_version "Microsoft Visual Studio 12.0")
- ELSE(MSVC14) #Visual Studio 14
+ ELSEIF(MSVC14) #Visual Studio 14
SET(cmake_c_compiler_version "Microsoft Visual Studio 14.0")
SET(cmake_cxx_compiler_version "Microsoft Visual Studio 14.0")
ENDIF()
diff --git a/gr-digital/examples/demod/symbol_sync_test_complex.grc b/gr-digital/examples/demod/symbol_sync_test_complex.grc
index cd0ca99e23..77bacdeb12 100644
--- a/gr-digital/examples/demod/symbol_sync_test_complex.grc
+++ b/gr-digital/examples/demod/symbol_sync_test_complex.grc
@@ -251,7 +251,7 @@
</param>
<param>
<key>value</key>
- <value>(2.0-proportional_gain-2.0*math.exp(-zeta*omega_n_norm)*(math.cosh(omega_d_norm) if zeta &gt; 1.0 else math.cos(omega_d_norm)))/ted_gain</value>
+ <value>2.0/ted_gain*(1.0-math.exp(-zeta*omega_n_norm)*(math.sinh(zeta*omega_n_norm)+(math.cosh(omega_d_norm) if zeta &gt; 1.0 else math.cos(omega_d_norm))))</value>
</param>
</block>
<block>
@@ -594,11 +594,11 @@
</param>
<param>
<key>start</key>
- <value>0.1</value>
+ <value>0.05</value>
</param>
<param>
<key>step</key>
- <value>0.1</value>
+ <value>0.01</value>
</param>
<param>
<key>stop</key>
@@ -1771,7 +1771,7 @@
</param>
<param>
<key>ted_gain</key>
- <value>1.0</value>
+ <value>ted_gain</value>
</param>
<param>
<key>nfilters</key>
diff --git a/gr-digital/examples/demod/symbol_sync_test_float.grc b/gr-digital/examples/demod/symbol_sync_test_float.grc
index 5507cbf848..ce1b24ba4b 100644
--- a/gr-digital/examples/demod/symbol_sync_test_float.grc
+++ b/gr-digital/examples/demod/symbol_sync_test_float.grc
@@ -251,7 +251,7 @@
</param>
<param>
<key>value</key>
- <value>(2.0-proportional_gain-2.0*math.exp(-zeta*omega_n_norm)*(math.cosh(omega_d_norm) if zeta &gt; 1.0 else math.cos(omega_d_norm)))/ted_gain</value>
+ <value>2.0/ted_gain*(1.0-math.exp(-zeta*omega_n_norm)*(math.sinh(zeta*omega_n_norm)+(math.cosh(omega_d_norm) if zeta &gt; 1.0 else math.cos(omega_d_norm))))</value>
</param>
</block>
<block>
@@ -332,7 +332,7 @@
</param>
<param>
<key>value</key>
- <value>0.07</value>
+ <value>0.125</value>
</param>
<param>
<key>_enabled</key>
@@ -558,7 +558,7 @@
</param>
<param>
<key>value</key>
- <value>1.0</value>
+ <value>0.28365</value>
</param>
<param>
<key>_enabled</key>
@@ -594,11 +594,11 @@
</param>
<param>
<key>start</key>
- <value>0.1</value>
+ <value>0.05</value>
</param>
<param>
<key>step</key>
- <value>0.1</value>
+ <value>0.01</value>
</param>
<param>
<key>stop</key>
@@ -1591,7 +1591,7 @@
</param>
<param>
<key>ted_gain</key>
- <value>1.0</value>
+ <value>ted_gain</value>
</param>
<param>
<key>nfilters</key>
diff --git a/gr-digital/examples/demod/symbol_sync_test_float_ted_gain.m b/gr-digital/examples/demod/symbol_sync_test_float_ted_gain.m
new file mode 100644
index 0000000000..c6860f2442
--- /dev/null
+++ b/gr-digital/examples/demod/symbol_sync_test_float_ted_gain.m
@@ -0,0 +1,139 @@
+% Copyright (C) 2017 Free Software Foundation
+%
+% 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.
+
+% GNU Octave script to accompany the GNURadio flowgraph
+%
+% gnuradio/gr-digital/examples/demod/symbol_sync_test_float.grc
+%
+% to simulate the Mueller and Muller and Gardner timing error detectors
+% and compute Expected TED gains applicable to the situation in that
+% flowgraph.
+
+% Define some constants
+N_bits = 30000; % Number of bits used for timing error analysis
+Rb = 1200.0;
+bits_per_sym = 1;
+baud_rate = Rb/bits_per_sym;
+N_syms = N_bits/bits_per_sym; % Number of symbols used for timing error analysis
+tea_sps = 100; % samples/symbol used for timing error analysis
+tea_Fs = tea_sps * baud_rate; % sample rate used for timing error analysis
+a_sps = 6.66667; % actual samples per symbol used in application
+a_Fs = a_sps * baud_rate; % actual sample rate used in application
+
+% Create rectangular pulse filter
+pf_taps = 1/tea_sps * ones(tea_sps, 1);
+pf_len = length(pf_taps);
+pf_delay = pf_len/2;
+
+% Generate some bits
+bits = rand(N_bits,1) > 0.5;
+%bits = repmat([1;0], [N_bits/2, 1]);
+
+% Convert the bits to NRZ symbols in [-1, 1]
+symbols = 2*bits-1;
+
+% Convert symbols to baseband pulses
+pkg load signal;
+x = tea_sps * upsample(symbols, tea_sps);
+baseband = filter(pf_taps, [1], x);
+
+% Create rectangular matched filter,
+% that's a little too long (7 sps vs 6.667 sps), to introduce more ISI
+isi_sps = round((tea_sps/a_sps * 7) - tea_sps); % Play with isi samples to see S-curve effects
+if (mod(isi_sps, 2) != 0)
+ isi_sps = isi_sps + 1;
+end
+mf_taps = 1/(tea_sps+isi_sps) * ones((tea_sps+isi_sps), 1);
+mf_len = length(mf_taps);
+mf_delay = mf_len/2;
+
+% Matched filter the received baseband pulses
+mf_baseband = filter(mf_taps, [1], baseband);
+mf_baseband = mf_baseband * 1.0; % Play with amplitude to see S-curve effects
+
+% Symbol centers are now at indices n*tea_sps + isi_sps/2 (I think!)
+% Symbol clock period is tea_sps samples
+% Symbol peaks are perfectly at +/-1.0
+
+% Timing offset granularity is in 1/tea_sps-th of a symbol
+tau = [(-tea_sps/2):1:(tea_sps/2-1)];
+tau_norm = tau/tea_sps*a_sps;
+
+% M&M TED. Contellation points at -1.0 and +1.0.
+% Gardener TED.
+% Perfect estimate of symbol clock period.
+% No external noise.
+mm_ted_output = zeros(N_syms-2, length(tau));
+ga_ted_output = zeros(N_syms-2, length(tau));
+% For each known symbol peak set (M&M needs prev and current symbol)
+for i = [2:(N_syms-1)]
+ % Cycle through all the timing offsets around this symbol
+ % using a perfect symbol clock period estimate
+ opt_prev_idx = (i-1)*tea_sps + isi_sps/2;
+ opt_curr_idx = i*tea_sps + isi_sps/2;
+ for j = [1:length(tau)]
+ prev_soft_sym = mf_baseband(opt_prev_idx - tau(j));
+ mid_soft_samp = mf_baseband((opt_curr_idx+opt_prev_idx)/2 - tau(j));
+ curr_soft_sym = mf_baseband(opt_curr_idx - tau(j));
+ if (prev_soft_sym >= 0)
+ prev_decision = 1;
+ else
+ prev_decision = -1;
+ end
+ if (curr_soft_sym >= 0)
+ curr_decision = 1;
+ else
+ curr_decision = -1;
+ end
+ mm_ted_output(i,j) = prev_decision * curr_soft_sym - curr_decision * prev_soft_sym;
+ ga_ted_output(i,j) = (prev_soft_sym - curr_soft_sym) * mid_soft_samp;
+ end
+end
+
+mean_mm_ted_output = mean(mm_ted_output);
+mean_ga_ted_output = mean(ga_ted_output);
+
+% Plot the S-Curves
+figure(1);
+plot(tau_norm, mean_mm_ted_output, '- .b;M and M TED;', ...
+ tau_norm, mean_ga_ted_output, '- +r;Gardner TED;');
+title('S-Curve, 6.667 Samples/Symbol, Rectangular Pulses, Imperfect MF, E_s/N_0 = \infty');
+xlabel('Timing Error from Symbol Center, \tau_\epsilon (samples)');
+ylabel('Expected Value of TED Output, E(e[n] | \tau_\epsilon)');
+grid on;
+
+% Plot the TED gains
+figure(2);
+tau_diff = tau(1:(end-1))+0.5;
+tau_diff_norm = tau_diff/tea_sps*a_sps;
+diff_mm_ted_output = diff(mean_mm_ted_output)/(a_sps/tea_sps);
+diff_ga_ted_output = diff(mean_ga_ted_output)/(a_sps/tea_sps);
+plot(tau_diff_norm, diff_mm_ted_output, '- .b;M and M TED;', ...
+ tau_diff_norm, diff_ga_ted_output, '- +r;Gardner TED;');
+title('TED Gain, 6.667 Samples/Symbol, Rectangular Pulses, Imperfect MF, E_s/N_0 = \infty');
+xlabel('Timing Error from Symbol Center, \tau_\epsilon (samples)');
+ylabel('Timing Error Detector Gain, Slope of E(e[n] | \tau_\epsilon), (sample^{-1})');
+grid on;
+
+% Print out the central TED gains
+k = length(diff_mm_ted_output);
+mm_ted_gain = mean(diff_mm_ted_output(((k-1)/2):((k-1)/2+1)))
+k = length(diff_ga_ted_output);
+ga_ted_gain = mean(diff_ga_ted_output(((k-1)/2):((k-1)/2+1)))
+
diff --git a/gr-digital/lib/correlate_access_code_bb_impl.cc b/gr-digital/lib/correlate_access_code_bb_impl.cc
index a01eb6a2b5..c547937c2a 100644
--- a/gr-digital/lib/correlate_access_code_bb_impl.cc
+++ b/gr-digital/lib/correlate_access_code_bb_impl.cc
@@ -109,13 +109,6 @@ namespace gr {
// test for access code with up to threshold errors
new_flag = (nwrong <= d_threshold);
- if(new_flag) {
- GR_LOG_DEBUG(d_logger, boost::format("access code found: %llx") % d_access_code);
- }
- else {
- GR_LOG_DEBUG(d_logger, boost::format("%llx ==> %llx") % d_access_code % d_data_reg);
- }
-
// shift in new data and new flag
d_data_reg = (d_data_reg << 1) | (in[i] & 0x1);
d_flag_reg = (d_flag_reg << 1);
diff --git a/gr-fec/lib/cc_encoder_impl.cc b/gr-fec/lib/cc_encoder_impl.cc
index 75d7dcd66b..9585d5fcd5 100644
--- a/gr-fec/lib/cc_encoder_impl.cc
+++ b/gr-fec/lib/cc_encoder_impl.cc
@@ -179,7 +179,7 @@ namespace gr {
for(unsigned int i = 0; i < d_frame_size; ++i) {
my_state = (my_state << 1) | (in[i] & 1);
for(unsigned int j = 0; j < d_rate; ++j) {
- out[i * d_rate + j] = parity(my_state & d_polys[j]) == 0 ? 0 : 1;
+ out[i * d_rate + j] = (d_polys[j] < 0) ^ parity(my_state & abs(d_polys[j])) ? 1 : 0;
}
}
@@ -187,7 +187,7 @@ namespace gr {
for(unsigned int i = 0; i < d_k - 1; ++i) {
my_state = (my_state << 1) | ((d_start_state >> (d_k - 2 - i)) & 1);
for(unsigned int j = 0; j < d_rate; ++j) {
- out[(i + d_frame_size) * d_rate + j] = parity(my_state & d_polys[j]) == 0 ? 0 : 1;
+ out[(i + d_frame_size) * d_rate + j] = (d_polys[j] < 0) ^ parity(my_state & abs(d_polys[j])) ? 1 : 0;
}
}
}
diff --git a/gr-fft/python/fft/logpwrfft.py b/gr-fft/python/fft/logpwrfft.py
index ee424f2f84..3c568b67e4 100644
--- a/gr-fft/python/fft/logpwrfft.py
+++ b/gr-fft/python/fft/logpwrfft.py
@@ -71,8 +71,8 @@ class _logpwrfft_base(gr.hier_block2):
self._avg = filter.single_pole_iir_filter_ff(1.0, fft_size)
self._log = blocks.nlog10_ff(10, fft_size,
-20*math.log10(fft_size) # Adjust for number of bins
- -10*math.log10(window_power / fft_size) # Adjust for windowing loss
- -20*math.log10(ref_scale / 2)) # Adjust for reference scale
+ -10*math.log10(float(window_power) / fft_size) # Adjust for windowing loss
+ -20*math.log10(float(ref_scale) / 2)) # Adjust for reference scale
self.connect(self, self._sd, fft, c2magsq, self._avg, self._log, self)
self._average = average
diff --git a/gr-qtgui/python/qtgui/range.py.cmakein b/gr-qtgui/python/qtgui/range.py.cmakein
index 00db509762..9ed7706195 100755
--- a/gr-qtgui/python/qtgui/range.py.cmakein
+++ b/gr-qtgui/python/qtgui/range.py.cmakein
@@ -182,11 +182,11 @@ class RangeWidget(QtWidgets.QWidget):
self.rangeType = rangeType
# Setup the counter
+ self.setDecimals(ranges.precision)
self.setRange(ranges.min, ranges.max)
self.setValue(ranges.default)
self.setSingleStep(ranges.step)
self.setKeyboardTracking(False)
- self.setDecimals(ranges.precision)
# The counter already handles floats and can be connected directly.
self.valueChanged.connect(self.changed)
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index d0002325b6..77c8d4c00d 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -149,11 +149,11 @@ GR_PYTHON_INSTALL(
)
GR_PYTHON_INSTALL(
- DIRECTORY core gui
+ DIRECTORY core gui converter
DESTINATION "${GR_PYTHON_DIR}/gnuradio/grc"
- FILES_MATCHING REGEX "\\.(py|dtd|grc|tmpl|png)$"
+ FILES_MATCHING REGEX "\\.(py|dtd|grc|tmpl|png|mako)$"
)
-
+
########################################################################
# Append NSIS commands to set environment variables
########################################################################
diff --git a/grc/converter/main.py b/grc/converter/main.py
index e5a836f511..5a18471fc7 100644
--- a/grc/converter/main.py
+++ b/grc/converter/main.py
@@ -64,6 +64,7 @@ class Converter(object):
self._force = force
try:
+ logger.debug("Loading block cache from: {}".format(self.cache_file))
with open(self.cache_file, encoding='utf-8') as cache_file:
self.cache = byteify(json.load(cache_file))
except (IOError, ValueError):
@@ -158,7 +159,7 @@ def byteify(data):
return {byteify(key): byteify(value) for key, value in six.iteritems(data)}
elif isinstance(data, list):
return [byteify(element) for element in data]
- elif isinstance(data, unicode):
+ elif isinstance(data, six.text_type) and six.PY2:
return data.encode('utf-8')
else:
return data
diff --git a/grc/core/FlowGraph.py b/grc/core/FlowGraph.py
index 481dda5786..3f21ec6a9c 100644
--- a/grc/core/FlowGraph.py
+++ b/grc/core/FlowGraph.py
@@ -387,9 +387,9 @@ class FlowGraph(Element):
had_connect_errors = False
_blocks = {block.name: block for block in self.blocks}
- # TODO: Crashes if connections section exists without actual connections.
- for src_blk_id, src_port_id, snk_blk_id, snk_port_id in data.get('connections', []):
- try:
+ try:
+ # TODO: Add better error handling if no connections exist in the flowgraph file.
+ for src_blk_id, src_port_id, snk_blk_id, snk_port_id in data.get('connections', []):
source_block = _blocks[src_blk_id]
sink_block = _blocks[snk_blk_id]
@@ -404,11 +404,11 @@ class FlowGraph(Element):
self.connect(source_port, sink_port)
- except (KeyError, LookupError) as e:
- Messages.send_error_load(
- 'Connection between {}({}) and {}({}) could not be made.\n\t{}'.format(
- src_blk_id, src_port_id, snk_blk_id, snk_port_id, e))
- had_connect_errors = True
+ except (KeyError, LookupError) as e:
+ Messages.send_error_load(
+ 'Connection between {}({}) and {}({}) could not be made.\n\t{}'.format(
+ src_blk_id, src_port_id, snk_blk_id, snk_port_id, e))
+ had_connect_errors = True
self.rewrite() # global rewrite
return had_connect_errors
diff --git a/grc/core/generator/hier_block.py b/grc/core/generator/hier_block.py
index 301562fa4f..237fd71377 100644
--- a/grc/core/generator/hier_block.py
+++ b/grc/core/generator/hier_block.py
@@ -191,7 +191,3 @@ def get_hier_block_io(flow_graph, direction, domain=None):
ports.append(clone)
else:
ports.append(master)
-
- if domain is not None:
- ports = [p for p in ports if p.domain == domain]
- yield ports # TODO: Not sure this fix is correct
diff --git a/grc/core/utils/flow_graph_complexity.py b/grc/core/utils/flow_graph_complexity.py
index 15ac131d9b..e8962b0ae3 100644
--- a/grc/core/utils/flow_graph_complexity.py
+++ b/grc/core/utils/flow_graph_complexity.py
@@ -1,51 +1,54 @@
def calculate(flowgraph):
""" Determines the complexity of a flowgraph """
- return " *** DISABLED *** " # TODO: Temporarily disabled.
- dbal = 0
- for block in flowgraph.blocks:
- # Skip options block
- if block.key == 'options':
- continue
-
- # Don't worry about optional sinks?
- sink_list = [c for c in block.sinks if not c.optional]
- source_list = [c for c in block.sources if not c.optional]
- sinks = float(len(sink_list))
- sources = float(len(source_list))
- base = max(min(sinks, sources), 1)
-
- # Port ratio multiplier
- if min(sinks, sources) > 0:
- multi = sinks / sources
- multi = (1 / multi) if multi > 1 else multi
+
+ try:
+ dbal = 0.0
+ for block in flowgraph.blocks:
+ if block.key == "options":
+ continue
+
+ # Determine the base value for this block
+ sinks = sum(1.0 for port in block.sinks if not port.optional)
+ sources = sum(1.0 for port in block.sources if not port.optional)
+ base = max(min(sinks, sources), 1)
+
+ # Determine the port multiplier
+ block_connections = 0.0
+ for port in block.sources:
+ block_connections += sum(1.0 for c in port.connections())
+ source_multi = max(block_connections / max(sources, 1.0), 1.0)
+
+ # Port ratio multiplier
+ multi = 1.0
+ if min(sinks, sources) > 0:
+ multi = float(sinks / sources)
+ multi = float(1 / multi) if multi > 1 else multi
+
+ dbal += base * multi * source_multi
+
+ blocks = float(len(flowgraph.blocks) - 1)
+ connections = float(len(flowgraph.connections))
+ variables = float(len(flowgraph.get_variables()))
+
+ enabled = float(len(flowgraph.get_enabled_blocks()))
+ enabled_connections = float(len(flowgraph.get_enabled_connections()))
+ disabled_connections = connections - enabled_connections
+
+ # Disabled multiplier
+ if enabled > 0:
+ disabled_multi = 1 / (max(1 - ((blocks - enabled) / max(blocks, 1)), 0.05))
+ else:
+ disabled_multi = 1
+
+ # Connection multiplier (How many connections )
+ if (connections - disabled_connections) > 0:
+ conn_multi = 1 / (max(1 - (disabled_connections / max(connections, 1)), 0.05))
else:
- multi = 1
-
- # Connection ratio multiplier
- sink_multi = max(float(sum(len(c.connections()) for c in sink_list) / max(sinks, 1.0)), 1.0)
- source_multi = max(float(sum(len(c.connections()) for c in source_list) / max(sources, 1.0)), 1.0)
- dbal += base * multi * sink_multi * source_multi
-
- blocks = float(len(flowgraph.blocks))
- connections = float(len(flowgraph.connections))
- elements = blocks + connections
- disabled_connections = sum(not c.enabled for c in flowgraph.connections)
-
- variables = elements - blocks - connections
- enabled = float(len(flowgraph.get_enabled_blocks()))
-
- # Disabled multiplier
- if enabled > 0:
- disabled_multi = 1 / (max(1 - ((blocks - enabled) / max(blocks, 1)), 0.05))
- else:
- disabled_multi = 1
-
- # Connection multiplier (How many connections )
- if (connections - disabled_connections) > 0:
- conn_multi = 1 / (max(1 - (disabled_connections / max(connections, 1)), 0.05))
- else:
- conn_multi = 1
-
- final = round(max((dbal - 1) * disabled_multi * conn_multi * connections, 0.0) / 1000000, 6)
- return final
+ conn_multi = 1
+
+ final = round(max((dbal - 1) * disabled_multi * conn_multi * connections, 0.0) / 1000000, 6)
+ return final
+
+ except Exception:
+ return "<Error>"
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index 45c9095313..f58ea78ca2 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -265,14 +265,17 @@ def show_about(parent, config):
ad = Gtk.AboutDialog(transient_for=parent)
ad.set_program_name(config.name)
ad.set_name('')
- ad.set_version(config.version)
ad.set_license(config.license)
+ py_version = sys.version.split()[0]
+ ad.set_version("{} (Python {})".format(config.version, py_version))
+
try:
ad.set_logo(Gtk.IconTheme().load_icon('gnuradio-grc', 64, 0))
except:
pass
+ #ad.set_comments("")
ad.set_copyright(config.license.splitlines()[0])
ad.set_website(config.website)
diff --git a/grc/main.py b/grc/main.py
index 2d182c226f..4f4cd68704 100755
--- a/grc/main.py
+++ b/grc/main.py
@@ -71,7 +71,8 @@ def main():
console.setFormatter(formatter)
log.addHandler(console)
- log.debug("Running main")
+ py_version = sys.version.split()[0]
+ log.debug("Starting GNU Radio Companion ({})".format(py_version))
# Delay importing until the logging is setup
from .gui.Platform import Platform
diff --git a/grc/scripts/gnuradio-companion b/grc/scripts/gnuradio-companion
index de776f22a7..55e66cc761 100755
--- a/grc/scripts/gnuradio-companion
+++ b/grc/scripts/gnuradio-companion
@@ -81,11 +81,6 @@ def check_blocks_path():
"Can't find block definitions. Use config.conf or GRC_BLOCKS_PATH.")
-def check_python_version():
- if sys.version_info.major > 2:
- die(RuntimeError('No python3 support yet.'), 'Stay tuned...')
-
-
def run_main():
script_path = os.path.dirname(os.path.abspath(__file__))
source_tree_subpath = "/grc/scripts"
@@ -103,6 +98,5 @@ def run_main():
if __name__ == '__main__':
check_gnuradio_import()
check_gtk()
- check_python_version()
check_blocks_path()
run_main()