don't resample when there's only one service
This commit is contained in:
parent
1b31c5fc90
commit
fd26acca68
@ -193,6 +193,7 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
||||||
else:
|
else:
|
||||||
for group in groups:
|
for group in groups:
|
||||||
|
if len(group) > 1:
|
||||||
cf = self.get_center_frequency(group)
|
cf = self.get_center_frequency(group)
|
||||||
bw = self.get_bandwidth(group)
|
bw = self.get_bandwidth(group)
|
||||||
logger.debug("group center frequency: {0}, bandwidth: {1}".format(cf, bw))
|
logger.debug("group center frequency: {0}, bandwidth: {1}".format(cf, bw))
|
||||||
@ -208,6 +209,9 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
# resampler goes in after the services since it must not be shutdown as long as the services are
|
# resampler goes in after the services since it must not be shutdown as long as the services are
|
||||||
# still running
|
# still running
|
||||||
self.services.append(resampler)
|
self.services.append(resampler)
|
||||||
|
else:
|
||||||
|
dial = group[0]
|
||||||
|
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
||||||
|
|
||||||
def get_min_max(self, group):
|
def get_min_max(self, group):
|
||||||
frequencies = sorted(group, key=lambda f: f["frequency"])
|
frequencies = sorted(group, key=lambda f: f["frequency"])
|
||||||
|
Loading…
Reference in New Issue
Block a user