diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2016-02-28 17:46:55 +0100 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2016-02-28 17:46:55 +0100 |
commit | e6f46a1c04f3f6daa48d2a49b00592a6e1f32b5c (patch) | |
tree | aab1e916240083c9a40950dffed668c48f781a7c /apps | |
parent | 2b798113503be73d67348dec5ed9f944de6fe7b6 (diff) |
apps: added --clock-source option to fft and siggen
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/osmocom_fft | 6 | ||||
-rw-r--r-- | apps/osmocom_siggen_base.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/osmocom_fft b/apps/osmocom_fft index 002f746..04a3b62 100755 --- a/apps/osmocom_fft +++ b/apps/osmocom_fft @@ -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() diff --git a/apps/osmocom_siggen_base.py b/apps/osmocom_siggen_base.py index cee3eb1..b6e9a0c 100644 --- a/apps/osmocom_siggen_base.py +++ b/apps/osmocom_siggen_base.py @@ -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, |