remove "configurable_keys" hack
This commit is contained in:
parent
5fc8672dd6
commit
c9d303c43e
@ -269,9 +269,6 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
|||||||
params = message["params"]
|
params = message["params"]
|
||||||
dsp.setProperties(params)
|
dsp.setProperties(params)
|
||||||
|
|
||||||
elif message["type"] == "config":
|
|
||||||
if "params" in message:
|
|
||||||
self.setParams(message["params"])
|
|
||||||
elif message["type"] == "setsdr":
|
elif message["type"] == "setsdr":
|
||||||
if "params" in message:
|
if "params" in message:
|
||||||
self.setSdr(message["params"]["sdr"])
|
self.setSdr(message["params"]["sdr"])
|
||||||
@ -348,21 +345,6 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
|||||||
if self.sdr is not None:
|
if self.sdr is not None:
|
||||||
self.sdr.removeSpectrumClient(self)
|
self.sdr.removeSpectrumClient(self)
|
||||||
|
|
||||||
def setParams(self, params):
|
|
||||||
config = Config.get()
|
|
||||||
# allow direct configuration only if enabled in the config
|
|
||||||
if "configurable_keys" not in config:
|
|
||||||
return
|
|
||||||
keys = config["configurable_keys"]
|
|
||||||
if not keys:
|
|
||||||
return
|
|
||||||
protected = self.stack.filter(*keys)
|
|
||||||
for key, value in params.items():
|
|
||||||
try:
|
|
||||||
protected[key] = value
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def getDsp(self):
|
def getDsp(self):
|
||||||
if self.dsp is None and self.sdr is not None:
|
if self.dsp is None and self.sdr is not None:
|
||||||
self.dsp = DspManager(self, self.sdr)
|
self.dsp = DspManager(self, self.sdr)
|
||||||
|
Loading…
Reference in New Issue
Block a user