fix bandwidth calculation for single-service groups

This commit is contained in:
Jakob Ketterl 2021-05-08 00:59:57 +02:00
parent 093ad6cd0d
commit dc848a7006

View File

@ -254,7 +254,10 @@ class ServiceHandler(SdrSourceEventClient):
groups.append([f for f in freqs if previous < f["frequency"]]) groups.append([f for f in freqs if previous < f["frequency"]])
def get_total_bandwidth(group): def get_total_bandwidth(group):
return bandwidth + len(group) * self.get_bandwidth(group) if len(group) > 1:
return bandwidth + len(group) * self.get_bandwidth(group)
else:
return bandwidth
total_bandwidth = sum([get_total_bandwidth(group) for group in groups]) total_bandwidth = sum([get_total_bandwidth(group) for group in groups])
return { return {