diff options
author | Volker Schroer <3470424+dl1ksv@users.noreply.github.com> | 2018-09-23 14:13:52 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-11-01 22:40:15 +0100 |
commit | a1dcad241e0531bf0ad3c7fc2da418015ac2a04b (patch) | |
tree | 4e0f348314608ddec408e5efb612dfa56429f053 | |
parent | 9f5e65d8ae9608acf7526095787d37c95f8fd543 (diff) |
Making enable/disable and paramater Spectrum width work
Legend settings and spectrum witdh settings for input type *float are not handled correctly.
This is fixed here.
The multiple reported error in qt time sink 'enable_tags'
( https://github.com/gnuradio/gnuradio/issues/2013 , https://github.com/gnuradio/gnuradio/pull/2032 )
is fixed, too.
To make these blocks properly work the following prs should be merged, too:
qtgui: Change the signals and slots to unsigned as well https://github.com/gnuradio/gnuradio/pull/2018
grc: Un-hide option_attributes from rest of parameters https://github.com/gnuradio/gnuradio/pull/1925
Handling line labels in time sink correctly if type complex or complex-msg
Add handling line labels in time sink if type float or float-msg
-rw-r--r-- | gr-qtgui/grc/qtgui_const_sink_x.block.yml | 5 | ||||
-rw-r--r-- | gr-qtgui/grc/qtgui_freq_sink_x.block.yml | 10 | ||||
-rw-r--r-- | gr-qtgui/grc/qtgui_histogram_sink_x.block.yml | 5 | ||||
-rw-r--r-- | gr-qtgui/grc/qtgui_time_sink_x.block.yml | 18 | ||||
-rw-r--r-- | gr-qtgui/grc/qtgui_waterfall_sink_x.block.yml | 10 |
5 files changed, 33 insertions, 15 deletions
diff --git a/gr-qtgui/grc/qtgui_const_sink_x.block.yml b/gr-qtgui/grc/qtgui_const_sink_x.block.yml index a815507938..1231a9f32e 100644 --- a/gr-qtgui/grc/qtgui_const_sink_x.block.yml +++ b/gr-qtgui/grc/qtgui_const_sink_x.block.yml @@ -418,8 +418,9 @@ templates: self.${id}.enable_grid(${grid}) self.${id}.enable_axis_labels(${axislabels}) - if not ${legend}: - self.${id}.disable_legend() + % if legend == "False": + self.${id}.disable_legend() + % endif labels = [${label1}, ${label2}, ${label3}, ${label4}, ${label5}, ${label6}, ${label7}, ${label8}, ${label9}, ${label10}] diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.block.yml b/gr-qtgui/grc/qtgui_freq_sink_x.block.yml index 3fb141c640..257838f9c2 100644 --- a/gr-qtgui/grc/qtgui_freq_sink_x.block.yml +++ b/gr-qtgui/grc/qtgui_freq_sink_x.block.yml @@ -414,11 +414,13 @@ templates: self.${id}.enable_axis_labels(${axislabels}) self.${id}.enable_control_panel(${ctrlpanel}) - if not ${legend}: - self.${id}.disable_legend() + % if legend == "False": + self.${id}.disable_legend() + % endif - if ${type} == "float" or ${type} == "msg_float": - self.${id}.set_plot_pos_half(not ${freqhalf}) + % if type == "float" or type == "msg_float": + self.${id}.set_plot_pos_half(not ${freqhalf}) + % endif labels = [${label1}, ${label2}, ${label3}, ${label4}, ${label5}, ${label6}, ${label7}, ${label8}, ${label9}, ${label10}] diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.block.yml b/gr-qtgui/grc/qtgui_histogram_sink_x.block.yml index d541ff5975..ec02c7466e 100644 --- a/gr-qtgui/grc/qtgui_histogram_sink_x.block.yml +++ b/gr-qtgui/grc/qtgui_histogram_sink_x.block.yml @@ -384,8 +384,9 @@ templates: self.${id}.enable_grid(${grid}) self.${id}.enable_axis_labels(${axislabels}) - if not ${legend}: - self.${id}.disable_legend() + % if legend == "False": + self.${id}.disable_legend() + % endif labels = [${label1}, ${label2}, ${label3}, ${label4}, ${label5}, ${label6}, ${label7}, ${label8}, ${label9}, ${label10}] diff --git a/gr-qtgui/grc/qtgui_time_sink_x.block.yml b/gr-qtgui/grc/qtgui_time_sink_x.block.yml index c3b995c73e..ca06e30c15 100644 --- a/gr-qtgui/grc/qtgui_time_sink_x.block.yml +++ b/gr-qtgui/grc/qtgui_time_sink_x.block.yml @@ -516,7 +516,7 @@ templates: self.${id}.set_y_label(${ylabel}, ${yunit}) - self.${id}.enable_tags(0, ${entags}) + self.${id}.enable_tags(${entags}) self.${id}.set_trigger_mode(${tr_mode}, ${tr_slope}, ${tr_level}, ${tr_delay}, ${tr_chan}, ${tr_tag}) self.${id}.enable_autoscale(${autoscale}) self.${id}.enable_grid(${grid}) @@ -524,8 +524,9 @@ templates: self.${id}.enable_control_panel(${ctrlpanel}) self.${id}.enable_stem_plot(${stemplot}) - if not ${legend}: - self.${id}.disable_legend() + % if legend == "False": + self.${id}.disable_legend() + % endif labels = [${label1}, ${label2}, ${label3}, ${label4}, ${label5}, ${label6}, ${label7}, ${label8}, ${label9}, ${label10}] @@ -555,6 +556,17 @@ templates: self.${id}.set_line_style(i, styles[i]) self.${id}.set_line_marker(i, markers[i]) self.${id}.set_line_alpha(i, alphas[i]) + % else: + for i in range(${1 if type.startswith('msg') else int(nconnections)}): + if len(labels[i]) == 0: + self.${id}.set_line_label(i, "Data {0}".format(i)) + else: + self.${id}.set_line_label(i, labels[i]) + self.${id}.set_line_width(i, widths[i]) + self.${id}.set_line_color(i, colors[i]) + self.${id}.set_line_style(i, styles[i]) + self.${id}.set_line_marker(i, markers[i]) + self.${id}.set_line_alpha(i, alphas[i]) % endif ${win} = sip.wrapinstance(self.${id}.pyqwidget(), Qt.QWidget) diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.block.yml b/gr-qtgui/grc/qtgui_waterfall_sink_x.block.yml index e0caacf639..4aaf1579ec 100644 --- a/gr-qtgui/grc/qtgui_waterfall_sink_x.block.yml +++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.block.yml @@ -269,11 +269,13 @@ templates: self.${id}.enable_grid(${grid}) self.${id}.enable_axis_labels(${axislabels}) - if not ${legend}: - self.${id}.disable_legend() + % if legend == "False": + self.${id}.disable_legend() + % endif - if "${type}" == "float" or "${type}" == "msg_float": - self.${id}.set_plot_pos_half(not ${freqhalf}) + % if type == "float" or type == "msg_float": + self.${id}.set_plot_pos_half(not ${freqhalf}) + % endif labels = [${label1}, ${label2}, ${label3}, ${label4}, ${label5}, ${label6}, ${label7}, ${label8}, ${label9}, ${label10}] |