apps: added --clock-source option to fft and siggen

soapy_support
Dimitri Stolnikov 7 years ago
parent 2b79811350
commit e6f46a1c04
  1. 6
      apps/osmocom_fft
  2. 6
      apps/osmocom_siggen_base.py

@ -65,6 +65,8 @@ class app_top_block(stdgui2.std_top_block, pubsub):
help="Device args, [default=%default]")
parser.add_option("-A", "--antenna", type="string", default=None,
help="Select RX antenna where appropriate")
parser.add_option("", "--clock-source",
help="Set the clock source; typically 'internal', 'external', 'external_1pps', 'mimo' or 'gpsdo'")
parser.add_option("-s", "--samp-rate", type="eng_float", default=None,
help="Set sample rate (bandwidth), minimum by default")
parser.add_option("-f", "--center-freq", type="eng_float", default=None,
@ -120,6 +122,10 @@ class app_top_block(stdgui2.std_top_block, pubsub):
if(options.antenna):
self.src.set_antenna(options.antenna)
# Set the clock source:
if options.clock_source is not None:
self.src.set_clock_source(options.clock_source)
if options.samp_rate is None:
options.samp_rate = self.src.get_sample_rates().start()

@ -189,6 +189,10 @@ class top_block(gr.top_block, pubsub):
print "Sink has no sample rates (wrong device arguments?)."
sys.exit(1)
# Set the clock source:
if options.clock_source is not None:
self.src.set_clock_source(options.clock_source)
if options.samp_rate is None:
options.samp_rate = self._sink.get_sample_rates().start()
@ -473,6 +477,8 @@ def get_options():
help="Device args, [default=%default]")
parser.add_option("-A", "--antenna", type="string", default=None,
help="Select Rx Antenna where appropriate")
parser.add_option("", "--clock-source",
help="Set the clock source; typically 'internal', 'external', 'external_1pps', 'mimo' or 'gpsdo'")
parser.add_option("-s", "--samp-rate", type="eng_float", default=None,
help="Set sample rate (bandwidth), minimum by default")
parser.add_option("-g", "--gain", type="eng_float", default=None,

Loading…
Cancel
Save