wire profile transmission into active sdr device hash

This commit is contained in:
Jakob Ketterl 2021-03-20 23:14:29 +01:00
parent 341e254640
commit 2a82f4e452

View File

@ -161,7 +161,8 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
modes = Modes.getModes()
self.write_modes(modes)
self.__sendProfiles()
self._sendProfiles()
SdrService.getActiveSources().wire(self._sendProfiles)
CpuUsageThread.getSharedInstance().add_client(self)
@ -238,7 +239,7 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
def getClientClass(self) -> SdrClientClass:
return SdrClientClass.USER
def __sendProfiles(self):
def _sendProfiles(self, *args):
profiles = [
{"name": s.getName() + " " + p["name"], "id": sid + "|" + pid}
for (sid, s) in SdrService.getActiveSources().items()
@ -314,8 +315,6 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
self.getDsp().setProperties(self.connectionProperties)
self.stack.replaceLayer(0, self.sdr.getProps())
self.__sendProfiles()
self.sdr.addSpectrumClient(self)
def handleNoSdrsAvailable(self):