improve dsp control handling
This commit is contained in:
parent
cb8ec3c760
commit
0c7b0d2eaa
@ -270,14 +270,14 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
||||
message = json.loads(message)
|
||||
if "type" in message:
|
||||
if message["type"] == "dspcontrol":
|
||||
if "action" in message and message["action"] == "start":
|
||||
self.startDsp()
|
||||
dsp = self.getDsp()
|
||||
if dsp is None:
|
||||
logger.warning("DSP not available; discarding client dspcontrol message")
|
||||
else:
|
||||
if "action" in message and message["action"] == "start":
|
||||
dsp.start()
|
||||
|
||||
if "params" in message:
|
||||
dsp = self.getDsp()
|
||||
if dsp is None:
|
||||
logger.warning("DSP not available; discarding client data")
|
||||
else:
|
||||
if "params" in message:
|
||||
params = message["params"]
|
||||
dsp.setProperties(params)
|
||||
|
||||
@ -337,9 +337,6 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
||||
def handleNoSdrsAvailable(self):
|
||||
self.write_sdr_error("No SDR Devices available")
|
||||
|
||||
def startDsp(self):
|
||||
self.getDsp().start()
|
||||
|
||||
def close(self):
|
||||
if self.sdr is not None:
|
||||
self.sdr.removeClient(self)
|
||||
|
Loading…
Reference in New Issue
Block a user