apps/osmocom_fft: Handle continuous range for sample rate gracefully

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
gr3.8
Sylvain Munaut 3 years ago
parent 1b827b9913
commit 77ac70ebc3
  1. 2
      apps/osmocom_fft

@ -442,7 +442,7 @@ class app_top_block(gr.top_block, Qt.QMainWindow):
self._add_section("Sample Rate", self.top_layout)
r = self.src.get_sample_rates()
self._srr = Range(r.start(), r.stop(), r.step(), self.src.get_sample_rate(), 100)
self._srr = Range(r.start(), r.stop(), r.step() or (r.stop() - r.start())/100, self.src.get_sample_rate(), 100)
self._srw = RangeWidget(self._srr, self.set_sample_rate, 'Sample Rate (Hz)', eng_widget, float)
self._shrink(self._srw)
self.top_layout.addWidget(self._srw)

Loading…
Cancel
Save