Skip to content

Commit

Permalink
Add 433 MHz option
Browse files Browse the repository at this point in the history
  • Loading branch information
argilo committed Nov 28, 2024
1 parent 5a71989 commit 00dccc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions secplus_rx.grc
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ blocks:
label0: 310 MHz
label1: 315 MHz
label2: 390 MHz
label3: ''
label3: 433 MHz
label4: ''
labels: '[]'
num_opts: '3'
num_opts: '4'
option0: '310150000'
option1: '315150000'
option2: '390150000'
option3: '3'
option3: '433920000'
option4: '4'
options: '[0, 1, 2]'
orient: Qt.QHBoxLayout
Expand Down Expand Up @@ -805,4 +805,4 @@ connections:

metadata:
file_format: 1
grc_version: 3.10.9.2
grc_version: 3.10.11.0
13 changes: 8 additions & 5 deletions secplus_rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# GNU Radio Python Flow Graph
# Title: Secplus Rx
# GNU Radio version: 3.10.9.2
# GNU Radio version: 3.10.11.0

from PyQt5 import Qt
from gnuradio import qtgui
Expand All @@ -29,6 +29,7 @@
import secplus_rx_secplus_decode as secplus_decode # embedded python block
import secplus_rx_secplus_v2_decode as secplus_v2_decode # embedded python block
import sip
import threading



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

self.settings = Qt.QSettings("GNU Radio", "secplus_rx")
self.settings = Qt.QSettings("gnuradio/flowgraphs", "secplus_rx")

try:
geometry = self.settings.value("geometry")
if geometry:
self.restoreGeometry(geometry)
except BaseException as exc:
print(f"Qt GUI: Could not restore geometry: {str(exc)}", file=sys.stderr)
self.flowgraph_started = threading.Event()

##################################################
# Variables
Expand All @@ -81,9 +83,9 @@ def __init__(self):
self._threshold_win = qtgui.RangeWidget(self._threshold_range, self.set_threshold, "Detection threshold", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._threshold_win)
# Create the options list
self._freq_options = [310150000, 315150000, 390150000]
self._freq_options = [310150000, 315150000, 390150000, 433920000]
# Create the labels list
self._freq_labels = ['310 MHz', '315 MHz', '390 MHz']
self._freq_labels = ['310 MHz', '315 MHz', '390 MHz', '433 MHz']
# Create the combo box
# Create the radio buttons
self._freq_group_box = Qt.QGroupBox("Frequency" + ": ")
Expand Down Expand Up @@ -197,7 +199,7 @@ def updateButtonChecked(self, button_id):


def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "secplus_rx")
self.settings = Qt.QSettings("gnuradio/flowgraphs", "secplus_rx")
self.settings.setValue("geometry", self.saveGeometry())
self.stop()
self.wait()
Expand Down Expand Up @@ -261,6 +263,7 @@ def main(top_block_cls=secplus_rx, options=None):
tb = top_block_cls()

tb.start()
tb.flowgraph_started.set()

tb.show()

Expand Down

0 comments on commit 00dccc3

Please sign in to comment.