commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10977 - gnuradio/branches/features/experimental-gui


From: jblum
Subject: [Commit-gnuradio] r10977 - gnuradio/branches/features/experimental-gui
Date: Tue, 5 May 2009 19:49:34 -0600 (MDT)

Author: jblum
Date: 2009-05-05 19:49:34 -0600 (Tue, 05 May 2009)
New Revision: 10977

Modified:
   gnuradio/branches/features/experimental-gui/usrp_siggen.py
Log:
usrp siggen using generic usrp internals to set lo offset and gain

Modified: gnuradio/branches/features/experimental-gui/usrp_siggen.py
===================================================================
--- gnuradio/branches/features/experimental-gui/usrp_siggen.py  2009-05-06 
01:40:37 UTC (rev 10976)
+++ gnuradio/branches/features/experimental-gui/usrp_siggen.py  2009-05-06 
01:49:34 UTC (rev 10977)
@@ -29,7 +29,6 @@
 TX_FREQ_KEY = 'tx_freq'
 DDC_FREQ_KEY = 'ddc_freq'
 BB_FREQ_KEY = 'bb_freq'
-LO_OFFSET_KEY = 'lo_offset'
 AMPLITUDE_KEY = 'amplitude'
 AMPL_RANGE_KEY = 'ampl_range'
 WAVEFORM_FREQ_KEY = 'waveform_freq'
@@ -77,9 +76,7 @@
         self.subscribe(INTERP_KEY, lambda i: setter(self, SAMP_RATE_KEY, 
self[DAC_RATE_KEY]/i))
         self.subscribe(SAMP_RATE_KEY, lambda e: setter(self, LINK_RATE_KEY, 
e*32))
         self[INTERP_KEY] = options.interp or 16
-        self[GAIN_KEY] = options.tx_gain
         self[TX_FREQ_KEY] = options.tx_freq
-        self[LO_OFFSET_KEY] = options.lo_offset
         self[AMPLITUDE_KEY] = options.amplitude
         self[WAVEFORM_FREQ_KEY] = options.waveform_freq
         self[WAVEFORM_OFFSET_KEY] = options.offset
@@ -90,13 +87,12 @@
         self.subscribe(INTERP_KEY, self.set_interp)
         self.subscribe(GAIN_KEY, self.set_gain)
         self.subscribe(TX_FREQ_KEY, self.set_freq)
-        self.subscribe(LO_OFFSET_KEY, self.set_lo_offset)
         self.subscribe(AMPLITUDE_KEY, self.set_amplitude)
         self.subscribe(WAVEFORM_FREQ_KEY, self.set_waveform_freq)
         self.subscribe(WAVEFORM2_FREQ_KEY, self.set_waveform2_freq)
         self.subscribe(TYPE_KEY, self.set_waveform)
         #force update on pubsub keys
-        for key in (INTERP_KEY, GAIN_KEY, TX_FREQ_KEY, LO_OFFSET_KEY,
+        for key in (INTERP_KEY, GAIN_KEY, TX_FREQ_KEY,
             AMPLITUDE_KEY, WAVEFORM_FREQ_KEY, WAVEFORM_OFFSET_KEY, 
WAVEFORM2_FREQ_KEY):
             self[key] = self[key]
         self[TYPE_KEY] = options.type #set type last
@@ -107,6 +103,7 @@
         self.publish(DAC_RATE_KEY, self._u.dac_rate)
         self.publish(FREQ_RANGE_KEY, self._u.freq_range)
         self.publish(GAIN_RANGE_KEY, self._u.gain_range)
+        self.publish(GAIN_KEY, self._u.gain)
         if self._verbose: print str(self._u)
 
     def _set_tx_amplitude(self, ampl):
@@ -144,12 +141,6 @@
         if self._verbose: print "Set interpolation rate to:", interp
         return True
 
-    def set_lo_offset(self, lo_offset):
-        if lo_offset is None: return
-        self._u.set_lo_offset(lo_offset)
-        if self._verbose:
-            print "Set LO offset frequency to: %sHz" % (n2s(lo_offset),)
-
     def set_gain(self, gain):
         if gain is None:
             g = self[GAIN_RANGE_KEY]
@@ -295,8 +286,6 @@
     usrp_options.add_tx_options(parser)
     parser.add_option("-f", "--tx-freq", type="eng_float", default=None,
                       help="Set carrier frequency to FREQ 
[default=mid-point]", metavar="FREQ")
-    parser.add_option("--lo-offset", type="eng_float", default=None,
-                      help="set daughterboard LO offset to OFFSET [default=hw 
default]")
     parser.add_option("-x", "--waveform-freq", type="eng_float", default=0,
                       help="Set baseband waveform frequency to FREQ 
[default=%default]")
     parser.add_option("-y", "--waveform2-freq", type="eng_float", default=None,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]