diff options
author | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-09-04 02:43:56 +0000 |
---|---|---|
committer | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-09-04 02:43:56 +0000 |
commit | 54d6b9281dc233e0b2acf26884073d973b7663de (patch) | |
tree | 15cd1fa40207e68c5035a50fd7d54536831c4599 /gnuradio-examples/python/usrp/siggen_min2.py | |
parent | 2c37e57fe4626ac30eb8c042e4d7daf64a0d45f5 (diff) |
Merged r6271:6278 from jcorgan/t182 into trunk. Implements ticket:182.
Created new top-level component, gr-utils, to hold commonly used utility
scripts (originally in gnuradio-examples). These now install into the
system path, allowing their use from wherever.
Reorganization of gnuradio-examples component:
* Commonly used utility scripts moved from python/usrp into gr-utils.
* Examples now install into $(prefix)/share/gnuradio/examples/...
* Channel coding examples moved into gr-trellis/src/examples, now install
from there, only if gr-atsc itself is going to built and installed.
* ATSC example scripts now install into example hierarchy
* Cruft has been moved into 'limbo' in repository, do not get installed
Trunk passes 'make distcheck'.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6279 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/usrp/siggen_min2.py')
-rwxr-xr-x | gnuradio-examples/python/usrp/siggen_min2.py | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/gnuradio-examples/python/usrp/siggen_min2.py b/gnuradio-examples/python/usrp/siggen_min2.py deleted file mode 100755 index 8709e3373f..0000000000 --- a/gnuradio-examples/python/usrp/siggen_min2.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python - -from gnuradio import gr -from gnuradio import usrp -from gnuradio import eng_notation -from gnuradio.eng_option import eng_option -from optparse import OptionParser - - - -def build_graph (): - - # interp = 32 - interp = 64 - nchan = 2 - - if nchan == 1: - mux = 0x0098 - #mux = 0x9800 - else: - mux = 0xba98 - - f0 = 100e3 - a0 = 16e3 - duc0 = 5e6 - - f1 = 50e3 - a1 = 16e3 - duc1 = 7e6 - - fg = gr.flow_graph () - - u = usrp.sink_c (0, interp, nchan, mux) - sample_rate = u.dac_freq () / interp - print "sample_rate = ", eng_notation.num_to_str (sample_rate) - print "usb_sample_rate = ", eng_notation.num_to_str (sample_rate * nchan) - - u.set_tx_freq (0, duc0) - u.set_tx_freq (1, duc1) - - interleave = gr.interleave (gr.sizeof_gr_complex) - fg.connect (interleave, u) - - src0 = gr.sig_source_c (sample_rate, gr.GR_SIN_WAVE, f0, a0, 0) - fg.connect (src0, (interleave, 0)) - - if nchan == 2: - if 1: - src1 = gr.sig_source_c (sample_rate, gr.GR_SIN_WAVE, f1, a1, 0) - else: - src1 = gr.noise_source_c (gr.GR_UNIFORM, a1) - fg.connect (src1, (interleave, 1)) - - return fg - - -if __name__ == '__main__': - fg = build_graph () - fg.start () - raw_input ('Press Enter to quit: ') - fg.stop () - |