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