[PATCH] fix osmocom_fft for current main-3.9 gnuradio

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Stefan `Sec` Zehl sec at 42.org
Sun Oct 10 15:53:57 UTC 2021


While playing with osmocom_fft, i found two additional issues:

- the '-S' option fails due to a RuntimeError being changed to a ValueError
- the '-Q' option fails due to a missing "parent" parameter.

the first patch should be backwards-compatible.
The second one i've only tested with gnuradio v3.9.3.0 / maint-3.9


>From 4411edd838236257e00825717a819989528e2cdb Mon Sep 17 00:00:00 2001
From: Stefan `Sec` Zehl <sec at 42.org>
Date: Sun, 10 Oct 2021 14:32:50 +0200
Subject: [PATCH 2/3] fix oscilloscope display

missing message port now returns ValueError
---
 apps/osmocom_fft | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/osmocom_fft b/apps/osmocom_fft
index 6e072f8c6c..40cba8cc14 100755
--- a/apps/osmocom_fft
+++ b/apps/osmocom_fft
@@ -317,7 +317,7 @@ class app_top_block(gr.top_block, Qt.QMainWindow):
         try:
             self.freq = freq_recv(self.set_freq)
             self.msg_connect((self.scope, 'freq'), (self.freq, 'msg'))
-        except RuntimeError:
+        except (RuntimeError, ValueError):
             self.freq = None
 
         self.file_sink = blocks.file_sink(gr.sizeof_gr_complex, "/dev/null", False)
-- 
2.30.2

>From c8b2bfd337adcfe1c1489ba9ec44fd56833d57e4 Mon Sep 17 00:00:00 2001
From: Stefan `Sec` Zehl <sec at 42.org>
Date: Sun, 10 Oct 2021 14:34:09 +0200
Subject: [PATCH 3/3] fix QTgui 'all-in-one' display

pybind seems to require the parent parameter now.
---
 apps/osmocom_fft | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/osmocom_fft b/apps/osmocom_fft
index 40cba8cc14..f829192cd6 100755
--- a/apps/osmocom_fft
+++ b/apps/osmocom_fft
@@ -288,7 +288,8 @@ class app_top_block(gr.top_block, Qt.QMainWindow):
                 plotfreq=True,
                 plotwaterfall=True,
                 plottime=True,
-                plotconst=True
+                plotconst=True,
+                parent=None
             )
             if hasattr(self.scope,'pyqwidget'):
                 self.scope_win = sip.wrapinstance(self.scope.pyqwidget(), Qt.QWidget)
-- 
2.30.2






More information about the osmocom-sdr mailing list