Skip to content

Commit 00dccc3

Browse files
committed
Add 433 MHz option
1 parent 5a71989 commit 00dccc3

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

secplus_rx.grc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ blocks:
6666
label0: 310 MHz
6767
label1: 315 MHz
6868
label2: 390 MHz
69-
label3: ''
69+
label3: 433 MHz
7070
label4: ''
7171
labels: '[]'
72-
num_opts: '3'
72+
num_opts: '4'
7373
option0: '310150000'
7474
option1: '315150000'
7575
option2: '390150000'
76-
option3: '3'
76+
option3: '433920000'
7777
option4: '4'
7878
options: '[0, 1, 2]'
7979
orient: Qt.QHBoxLayout
@@ -805,4 +805,4 @@ connections:
805805

806806
metadata:
807807
file_format: 1
808-
grc_version: 3.10.9.2
808+
grc_version: 3.10.11.0

secplus_rx.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# GNU Radio Python Flow Graph
88
# Title: Secplus Rx
9-
# GNU Radio version: 3.10.9.2
9+
# GNU Radio version: 3.10.11.0
1010

1111
from PyQt5 import Qt
1212
from gnuradio import qtgui
@@ -29,6 +29,7 @@
2929
import secplus_rx_secplus_decode as secplus_decode # embedded python block
3030
import secplus_rx_secplus_v2_decode as secplus_v2_decode # embedded python block
3131
import sip
32+
import threading
3233

3334

3435

@@ -55,14 +56,15 @@ def __init__(self):
5556
self.top_grid_layout = Qt.QGridLayout()
5657
self.top_layout.addLayout(self.top_grid_layout)
5758

58-
self.settings = Qt.QSettings("GNU Radio", "secplus_rx")
59+
self.settings = Qt.QSettings("gnuradio/flowgraphs", "secplus_rx")
5960

6061
try:
6162
geometry = self.settings.value("geometry")
6263
if geometry:
6364
self.restoreGeometry(geometry)
6465
except BaseException as exc:
6566
print(f"Qt GUI: Could not restore geometry: {str(exc)}", file=sys.stderr)
67+
self.flowgraph_started = threading.Event()
6668

6769
##################################################
6870
# Variables
@@ -81,9 +83,9 @@ def __init__(self):
8183
self._threshold_win = qtgui.RangeWidget(self._threshold_range, self.set_threshold, "Detection threshold", "counter_slider", float, QtCore.Qt.Horizontal)
8284
self.top_layout.addWidget(self._threshold_win)
8385
# Create the options list
84-
self._freq_options = [310150000, 315150000, 390150000]
86+
self._freq_options = [310150000, 315150000, 390150000, 433920000]
8587
# Create the labels list
86-
self._freq_labels = ['310 MHz', '315 MHz', '390 MHz']
88+
self._freq_labels = ['310 MHz', '315 MHz', '390 MHz', '433 MHz']
8789
# Create the combo box
8890
# Create the radio buttons
8991
self._freq_group_box = Qt.QGroupBox("Frequency" + ": ")
@@ -197,7 +199,7 @@ def updateButtonChecked(self, button_id):
197199

198200

199201
def closeEvent(self, event):
200-
self.settings = Qt.QSettings("GNU Radio", "secplus_rx")
202+
self.settings = Qt.QSettings("gnuradio/flowgraphs", "secplus_rx")
201203
self.settings.setValue("geometry", self.saveGeometry())
202204
self.stop()
203205
self.wait()
@@ -261,6 +263,7 @@ def main(top_block_cls=secplus_rx, options=None):
261263
tb = top_block_cls()
262264

263265
tb.start()
266+
tb.flowgraph_started.set()
264267

265268
tb.show()
266269

0 commit comments

Comments
 (0)