[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/21: qtgui: Throw an error if the PDU is
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/21: qtgui: Throw an error if the PDU is not a multiple of the fft size. |
Date: |
Fri, 30 Oct 2015 21:11:26 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 2f79e9471a7e87477ac5b1edce91abac10f806ea
Author: Tom Rondeau <address@hidden>
Date: Wed Oct 21 13:25:06 2015 -0400
qtgui: Throw an error if the PDU is not a multiple of the fft size.
Can crash if this condition is not bet.
Also, rearraigned the order of the message ports so the PDU port is
always available.
---
gr-qtgui/grc/qtgui_waterfall_sink_x.xml | 5 ++---
gr-qtgui/lib/waterfall_sink_c_impl.cc | 4 ++++
gr-qtgui/lib/waterfall_sink_f_impl.cc | 4 ++++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
index f0d0c60..128172b 100644
--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
@@ -494,14 +494,13 @@ $(gui_hint()($win))</make>
</sink>
<sink>
- <name>freq</name>
+ <name>pdus</name>
<type>message</type>
<optional>1</optional>
- <hide>$showports</hide>
</sink>
<sink>
- <name>pdus</name>
+ <name>freq</name>
<type>message</type>
<optional>1</optional>
<hide>$showports</hide>
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index 2c4045a..da732c2 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -568,6 +568,10 @@ namespace gr {
pmt::pmt_t samples = pmt::cdr(msg);
len = pmt::length(samples);
+ if(len % d_fftsize != 0) {
+ throw std::runtime_error("waterfall_sink_c::handle_pdus: PDU must be
"
+ "a multiple of the FFT size.");
+ }
pmt::pmt_t start_key = pmt::string_to_symbol("start");
if(pmt::dict_has_key(dict, start_key)) {
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc
b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index d8ee567..90043b9 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -577,6 +577,10 @@ namespace gr {
pmt::pmt_t samples = pmt::cdr(msg);
len = pmt::length(samples);
+ if(len % d_fftsize != 0) {
+ throw std::runtime_error("waterfall_sink_f::handle_pdus: PDU must be
"
+ "a multiple of the FFT size.");
+ }
pmt::pmt_t start_key = pmt::string_to_symbol("start");
if(pmt::dict_has_key(dict, start_key)) {
- [Commit-gnuradio] [gnuradio] branch master updated (1aface8 -> f8a84eb), git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 03/21: grc: disconnect hidden blocks, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 01/21: blocks: Add Complex to IChar block, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 13/21: qtgui: time display: fixes a threading issue., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 02/21: grc: fix port placement for hidden ports, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 06/21: qtgui: whitespace and line formatting, git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 12/21: qtgui: histogram plotter supports PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 08/21: qtgui: Better support for waterfall PDU message port., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 05/21: qtgui: added documentation describing pdus message input port., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 04/21: qtgui: Throw an error if the PDU is not a multiple of the fft size.,
git <=
- [Commit-gnuradio] [gnuradio] 17/21: Merge branch 'maint', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 18/21: Merge remote-tracking branch 'miek/complex-to-ichar', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 20/21: Merge branch 'maint', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 11/21: qtgui: time raster plotters support PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 09/21: qtgui: constellation plotter supports PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 21/21: Merge remote-tracking branch 'tom/qtgui/pdu_handling', git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 15/21: qtgui: documenting message input support., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 07/21: qtgui: freq plotters support PDU message plotting., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 19/21: qtgui: cleaned non in-tree block from qtgui_message_inputs example., git, 2015/10/30
- [Commit-gnuradio] [gnuradio] 10/21: qtgui: time plotters support PDU message plotting., git, 2015/10/30