diff --git a/owrx/connection.py b/owrx/connection.py index e324cd2..445d73d 100644 --- a/owrx/connection.py +++ b/owrx/connection.py @@ -116,6 +116,7 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient): "start_freq", "center_freq", "initial_squelch_level", + "sdr_id", "profile_id", "squelch_auto_margin", ] diff --git a/owrx/source/__init__.py b/owrx/source/__init__.py index 111f507..540b7f4 100644 --- a/owrx/source/__init__.py +++ b/owrx/source/__init__.py @@ -52,7 +52,12 @@ class SdrSource(ABC): self.props = PropertyStack() # layer 0 reserved for profile properties self.props.addLayer(1, props) - self.props.addLayer(2, Config.get()) + # the sdr_id is constant, so we put it in a separate layer + # this is used to detect device changes, that are then sent to the client + sdrIdLayer = PropertyLayer() + sdrIdLayer["sdr_id"] = id + self.props.addLayer(2, sdrIdLayer.readonly()) + self.props.addLayer(3, Config.get()) self.sdrProps = self.props.filter(*self.getEventNames()) self.profile_id = None