From d00a95e7292ecb00d0a10782c5241b826825f6ed Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Tue, 15 Aug 2023 00:27:07 -0400 Subject: [PATCH] Made EIBI auto-bookmarks an option. --- owrx/config/defaults.py | 1 + owrx/connection.py | 4 +++- owrx/controllers/settings/general.py | 12 ++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/owrx/config/defaults.py b/owrx/config/defaults.py index b392dadd..4afb7504 100644 --- a/owrx/config/defaults.py +++ b/owrx/config/defaults.py @@ -202,4 +202,5 @@ defaultConfig = PropertyLayer( wsprnet_enabled=False, wsprnet_callsign="N0CALL", paging_filter=True, + eibi_bookmarks=False, ).readonly() diff --git a/owrx/connection.py b/owrx/connection.py index d2b60492..2db25e5d 100644 --- a/owrx/connection.py +++ b/owrx/connection.py @@ -213,7 +213,9 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient): frequencyRange = (cf - srh, cf + srh) dial_frequencies = Bandplan.getSharedInstance().collectDialFrequencies(frequencyRange) bookmarks = [b.__dict__() for b in Bookmarks.getSharedInstance().getBookmarks(frequencyRange)] - bookmarks += [b.__dict__() for b in EIBI.getSharedInstance().currentBookmarks(frequencyRange)] + # Search EIBI schedule for bookmarks, if enabled + if self.stack["eibi_bookmarks"]: + bookmarks += [b.__dict__() for b in EIBI.getSharedInstance().currentBookmarks(frequencyRange)] self.write_dial_frequencies(dial_frequencies) self.write_bookmarks(bookmarks) diff --git a/owrx/controllers/settings/general.py b/owrx/controllers/settings/general.py index 4e2390f2..45e9ea35 100644 --- a/owrx/controllers/settings/general.py +++ b/owrx/controllers/settings/general.py @@ -194,16 +194,20 @@ class GeneralSettingsController(SettingsFormController): "ui_frame", "Show frame around receiver panel", ), - CheckboxInput( - "ui_swap_wheel", - "Make mouse wheel control zoom, tune by holding wheel down", - ), DropdownInput( "tuning_precision", "Tuning precision", options=[Option(str(i), "{} Hz".format(10 ** i)) for i in range(0, 6)], converter=IntConverter(), ), + CheckboxInput( + "ui_swap_wheel", + "Make mouse wheel control zoom, tune by holding wheel down", + ), + CheckboxInput( + "eibi_bookmarks", + "Automatically create bookmarks based on the EIBI schedules", + ), ), Section( "Map settings",