commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10937 - gnuradio/branches/developers/jblum/digital


From: jblum
Subject: [Commit-gnuradio] r10937 - gnuradio/branches/developers/jblum/digital
Date: Fri, 1 May 2009 12:56:34 -0600 (MDT)

Author: jblum
Date: 2009-05-01 12:56:34 -0600 (Fri, 01 May 2009)
New Revision: 10937

Modified:
   gnuradio/branches/developers/jblum/digital/generic_usrp.py
   gnuradio/branches/developers/jblum/digital/tx_voice.py
Log:
made set_auto_tr a public method for generic usrp, sets it enabled by default 
for usrp1 case

Modified: gnuradio/branches/developers/jblum/digital/generic_usrp.py
===================================================================
--- gnuradio/branches/developers/jblum/digital/generic_usrp.py  2009-05-01 
18:27:06 UTC (rev 10936)
+++ gnuradio/branches/developers/jblum/digital/generic_usrp.py  2009-05-01 
18:56:34 UTC (rev 10937)
@@ -66,6 +66,9 @@
         elif self._type == USRP2_TYPE:
             return self._u.set_center_freq(target_freq)
 
+    def set_auto_tr(self, enable):
+        if self._type == USRP_TYPE: return self._subdev.set_auto_tr(enable)
+
     def __del__(self):
         # Avoid weak reference error
         if self._type == USRP_TYPE: del self._subdev
@@ -94,6 +97,7 @@
             try: self._setup_usrp2_source()
             except: self._setup_usrp_source()
         self.connect(self._u, self)
+        self.set_auto_tr(True)
 
     ####################################################################
     # generic access methods
@@ -116,7 +120,6 @@
             self._subdev_spec = usrp.pick_rx_subdevice(self._u)
         self._subdev = usrp.selected_subdev(self._u, self._subdev_spec)
         self._u.set_mux(usrp.determine_rx_mux_value(self._u, 
self._subdev_spec))
-        self._subdev.set_auto_tr(True)
         self._type = USRP_TYPE
         self._dxc = 0
 
@@ -149,6 +152,7 @@
             try: self._setup_usrp2_source()
             except: self._setup_usrp_source()
         self.connect(self, self._u)
+        self.set_auto_tr(True)
 
     ####################################################################
     # generic access methods
@@ -175,7 +179,6 @@
             self._subdev_spec = usrp.pick_tx_subdevice(self._u)
         self._subdev = usrp.selected_subdev(self._u, self._subdev_spec)
         self._u.set_mux(usrp.determine_tx_mux_value(self._u, 
self._subdev_spec))
-        self._subdev.set_auto_tr(True)
         self._type = USRP_TYPE
         self._dxc = self._subdev.which()
 

Modified: gnuradio/branches/developers/jblum/digital/tx_voice.py
===================================================================
--- gnuradio/branches/developers/jblum/digital/tx_voice.py      2009-05-01 
18:27:06 UTC (rev 10936)
+++ gnuradio/branches/developers/jblum/digital/tx_voice.py      2009-05-01 
18:56:34 UTC (rev 10937)
@@ -139,7 +139,6 @@
         
     send_pkt(eof=True)
     tb.wait()                       # wait for it to finish
-    tb.txpath.set_auto_tr(False)
 
 
 if __name__ == '__main__':





reply via email to

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