rename
This commit is contained in:
parent
4e4266f1c4
commit
8a2356580a
@ -38,7 +38,7 @@ class SdrSource(ABC):
|
|||||||
# layer 0 reserved for profile properties
|
# layer 0 reserved for profile properties
|
||||||
self.props.addLayer(1, props)
|
self.props.addLayer(1, props)
|
||||||
self.props.addLayer(2, Config.get())
|
self.props.addLayer(2, Config.get())
|
||||||
self.rtlProps = self.props.filter(*self.getEventNames())
|
self.sdrProps = self.props.filter(*self.getEventNames())
|
||||||
|
|
||||||
self.profile_id = None
|
self.profile_id = None
|
||||||
self.activateProfile()
|
self.activateProfile()
|
||||||
@ -84,7 +84,7 @@ class SdrSource(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def wireEvents(self):
|
def wireEvents(self):
|
||||||
self.rtlProps.wire(self.onPropertyChange)
|
self.sdrProps.wire(self.onPropertyChange)
|
||||||
|
|
||||||
def getCommand(self):
|
def getCommand(self):
|
||||||
return [self.getCommandMapper().map(self.getCommandValues())]
|
return [self.getCommandMapper().map(self.getCommandValues())]
|
||||||
@ -130,7 +130,7 @@ class SdrSource(ABC):
|
|||||||
return self.port
|
return self.port
|
||||||
|
|
||||||
def getCommandValues(self):
|
def getCommandValues(self):
|
||||||
dict = self.rtlProps.__dict__()
|
dict = self.sdrProps.__dict__()
|
||||||
if "lfo_offset" in dict and dict["lfo_offset"] is not None:
|
if "lfo_offset" in dict and dict["lfo_offset"] is not None:
|
||||||
dict["tuner_freq"] = dict["center_freq"] + dict["lfo_offset"]
|
dict["tuner_freq"] = dict["center_freq"] + dict["lfo_offset"]
|
||||||
else:
|
else:
|
||||||
|
@ -45,10 +45,10 @@ class ConnectorSource(SdrSource):
|
|||||||
return
|
return
|
||||||
if (
|
if (
|
||||||
(prop == "center_freq" or prop == "lfo_offset")
|
(prop == "center_freq" or prop == "lfo_offset")
|
||||||
and "lfo_offset" in self.rtlProps
|
and "lfo_offset" in self.sdrProps
|
||||||
and self.rtlProps["lfo_offset"] is not None
|
and self.sdrProps["lfo_offset"] is not None
|
||||||
):
|
):
|
||||||
freq = self.rtlProps["center_freq"] + self.rtlProps["lfo_offset"]
|
freq = self.sdrProps["center_freq"] + self.sdrProps["lfo_offset"]
|
||||||
self.sendControlMessage("center_freq", freq)
|
self.sendControlMessage("center_freq", freq)
|
||||||
else:
|
else:
|
||||||
self.sendControlMessage(prop, value)
|
self.sendControlMessage(prop, value)
|
||||||
|
@ -23,7 +23,7 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def getNmuxCommand(self):
|
def getNmuxCommand(self):
|
||||||
props = self.rtlProps
|
props = self.sdrProps
|
||||||
|
|
||||||
nmux_bufcnt = nmux_bufsize = 0
|
nmux_bufcnt = nmux_bufsize = 0
|
||||||
while nmux_bufsize < props["samp_rate"] / 4:
|
while nmux_bufsize < props["samp_rate"] / 4:
|
||||||
|
Loading…
Reference in New Issue
Block a user