diff --git a/owrx/config/defaults.py b/owrx/config/defaults.py index 8b01bfde..0b1d380f 100644 --- a/owrx/config/defaults.py +++ b/owrx/config/defaults.py @@ -157,6 +157,8 @@ defaultConfig = PropertyLayer( waterfall_auto_min_range=50, ui_opacity=100, ui_frame=False, + allow_center_freq_changes=False, + allow_audio_recording=True, tuning_precision=2, squelch_auto_margin=10, google_maps_api_key="", diff --git a/owrx/connection.py b/owrx/connection.py index 19aac2e4..a81bb630 100644 --- a/owrx/connection.py +++ b/owrx/connection.py @@ -139,6 +139,8 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient): "tuning_precision", "ui_opacity", "ui_frame", + "allow_center_freq_changes", + "allow_audio_recording", ] def __init__(self, conn): @@ -297,8 +299,9 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient): self.sdr.activateProfile(profile[1]) elif message["type"] == "setfrequency": if "params" in message and "frequency" in message["params"]: - frequency = message["params"]["frequency"] - self.sdr.setCenterFreq(frequency) + if self.stack["allow_center_freq_changes"]: + frequency = message["params"]["frequency"] + self.sdr.setCenterFreq(frequency) elif message["type"] == "connectionproperties": if "params" in message: self.connectionProperties = message["params"] diff --git a/owrx/controllers/settings/general.py b/owrx/controllers/settings/general.py index 574ecefb..50bc11eb 100644 --- a/owrx/controllers/settings/general.py +++ b/owrx/controllers/settings/general.py @@ -91,6 +91,14 @@ class GeneralSettingsController(SettingsFormController): infotext="Specifies web page describing receiver usage policy " + "and shown when a client session times out.", ), + CheckboxInput( + "allow_center_freq_changes", + "Allow users to change center frequency", + ), + CheckboxInput( + "allow_audio_recording", + "Allow users to record received audio", + ), ), Section( "Receiver listings",