From d68d780daf0be139af986f66a08867b4d29c701f Mon Sep 17 00:00:00 2001
From: Yuval Adam <_@yuv.al>
Date: Tue, 5 Jun 2018 11:45:34 +0300
Subject: Final changes, showtime
---
fm.grc | 14 ++++++-------
talk.ipynb | 17 +++++++++-------
talk.slides.html | 19 ++++++++++-------
top_block.py | 62 ++++++++------------------------------------------------
4 files changed, 37 insertions(+), 75 deletions(-)
diff --git a/fm.grc b/fm.grc
index 3637357..a9b9959 100644
--- a/fm.grc
+++ b/fm.grc
@@ -30,7 +30,7 @@
# De-emphasis filter
-# Even I'm not sure how/why this works
+# Even I'm not sure exactly how/why this works
# MAKE THINGS SOUND BETTER
@@ -12190,7 +12191,7 @@ a.anchor-link {
# HIT IT
@@ -12219,8 +12220,8 @@ a.anchor-link {
Review¶
- Took a fixed set of samples, did some math on them
-- Python, NumPy and SciPy are very good at doing fast processing of static data
-- When handling real-time data, buffering becomes a serious issue
+- Python, NumPy and SciPy are very good at doing fast processing of static data
+- When handling real-time data, buffering becomes a serious issue
- How do you synchronize different input/ouput sample rates on the same flow?
@@ -12258,6 +12259,10 @@ a.anchor-link {
- Michael Ossmann's video course - https://greatscottgadgets.com/sdr/
+- But you don't really need do know math
+- Lots of code is already written
+
+
- Explore the radio waves!
diff --git a/top_block.py b/top_block.py
index 8e104f7..344ef7d 100755
--- a/top_block.py
+++ b/top_block.py
@@ -3,20 +3,9 @@
##################################################
# GNU Radio Python Flow Graph
# Title: Top Block
-# Generated: Mon May 28 19:47:27 2018
+# Generated: Tue Jun 5 07:29:57 2018
##################################################
-if __name__ == '__main__':
- import ctypes
- import sys
- if sys.platform.startswith('linux'):
- try:
- x11 = ctypes.cdll.LoadLibrary('libX11.so')
- x11.XInitThreads()
- except:
- print "Warning: failed to XInitThreads()"
-
-from PyQt4 import Qt
from gnuradio import analog
from gnuradio import audio
from gnuradio import eng_notation
@@ -26,36 +15,13 @@ from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes
from optparse import OptionParser
import osmosdr
-import sys
import time
-from gnuradio import qtgui
-class top_block(gr.top_block, Qt.QWidget):
+class top_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self, "Top Block")
- Qt.QWidget.__init__(self)
- self.setWindowTitle("Top Block")
- qtgui.util.check_set_qss()
- try:
- self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
- except:
- pass
- self.top_scroll_layout = Qt.QVBoxLayout()
- self.setLayout(self.top_scroll_layout)
- self.top_scroll = Qt.QScrollArea()
- self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
- self.top_scroll_layout.addWidget(self.top_scroll)
- self.top_scroll.setWidgetResizable(True)
- self.top_widget = Qt.QWidget()
- self.top_scroll.setWidget(self.top_widget)
- self.top_layout = Qt.QVBoxLayout(self.top_widget)
- self.top_grid_layout = Qt.QGridLayout()
- self.top_layout.addLayout(self.top_grid_layout)
-
- self.settings = Qt.QSettings("GNU Radio", "top_block")
- self.restoreGeometry(self.settings.value("geometry").toByteArray())
##################################################
# Variables
@@ -102,11 +68,6 @@ class top_block(gr.top_block, Qt.QWidget):
self.connect((self.rational_resampler_xxx_0, 0), (self.audio_sink_0, 0))
self.connect((self.rtlsdr_source_0, 0), (self.low_pass_filter_0, 0))
- def closeEvent(self, event):
- self.settings = Qt.QSettings("GNU Radio", "top_block")
- self.settings.setValue("geometry", self.saveGeometry())
- event.accept()
-
def get_samp_rate(self):
return self.samp_rate
@@ -131,21 +92,14 @@ class top_block(gr.top_block, Qt.QWidget):
def main(top_block_cls=top_block, options=None):
- from distutils.version import StrictVersion
- if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
- style = gr.prefs().get_string('qtgui', 'style', 'raster')
- Qt.QApplication.setGraphicsSystem(style)
- qapp = Qt.QApplication(sys.argv)
-
tb = top_block_cls()
tb.start()
- tb.show()
-
- def quitting():
- tb.stop()
- tb.wait()
- qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
- qapp.exec_()
+ try:
+ raw_input('Press Enter to quit: ')
+ except EOFError:
+ pass
+ tb.stop()
+ tb.wait()
if __name__ == '__main__':
--
cgit v1.3.1