disable config interface unless explicitly enables in the config
This commit is contained in:
parent
d94914629f
commit
9a5aba7313
@ -247,10 +247,14 @@ class OpenWebRxReceiverClient(Client):
|
|||||||
self.sdr.removeSpectrumClient(self)
|
self.sdr.removeSpectrumClient(self)
|
||||||
|
|
||||||
def setParams(self, params):
|
def setParams(self, params):
|
||||||
|
# allow direct configuration only if enabled in the config
|
||||||
|
keys = PropertyManager.getSharedInstance()["configurable_keys"]
|
||||||
|
if not keys:
|
||||||
|
return
|
||||||
# only the keys in the protected property manager can be overridden from the web
|
# only the keys in the protected property manager can be overridden from the web
|
||||||
protected = (
|
protected = (
|
||||||
self.sdr.getProps()
|
self.sdr.getProps()
|
||||||
.collect("samp_rate", "center_freq", "rf_gain", "type")
|
.collect(*keys)
|
||||||
.defaults(PropertyManager.getSharedInstance())
|
.defaults(PropertyManager.getSharedInstance())
|
||||||
)
|
)
|
||||||
for key, value in params.items():
|
for key, value in params.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user