commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10971 - gnuradio/branches/developers/eb/t371/usrp/hos


From: eb
Subject: [Commit-gnuradio] r10971 - gnuradio/branches/developers/eb/t371/usrp/host/lib/legacy
Date: Tue, 5 May 2009 18:22:46 -0600 (MDT)

Author: eb
Date: 2009-05-05 18:22:46 -0600 (Tue, 05 May 2009)
New Revision: 10971

Modified:
   gnuradio/branches/developers/eb/t371/usrp/host/lib/legacy/db_xcvr2450.cc
Log:
Semi-kludge when both Tx and Rx sides have been open...


Modified: 
gnuradio/branches/developers/eb/t371/usrp/host/lib/legacy/db_xcvr2450.cc
===================================================================
--- gnuradio/branches/developers/eb/t371/usrp/host/lib/legacy/db_xcvr2450.cc    
2009-05-05 23:45:16 UTC (rev 10970)
+++ gnuradio/branches/developers/eb/t371/usrp/host/lib/legacy/db_xcvr2450.cc    
2009-05-06 00:22:46 UTC (rev 10971)
@@ -103,11 +103,11 @@
   void _set_ifagc(float gain);
   void _set_pga(float pga_gain);
 
+public:
   usrp_basic *usrp(){
     return d_raw_usrp;
   }
 
-public:
   xcvr2450(usrp_basic_sptr usrp, int which);
   ~xcvr2450();
   void shutdown();
@@ -634,13 +634,17 @@
 void
 db_xcvr2450_base::shutdown_common()
 {
-  std::cerr << "db_xcvr2450_base::shutdown_common: d_xcvr.use_count = "
-           << d_xcvr.use_count() << std::endl;
+  // If the usrp_basic in the xcvr2450 is the same as the usrp_basic
+  // in the daughterboard, shutdown the xcvr now (when only one of Tx
+  // and Rx is open, this is always true).
 
-  // If we're the last user of d_xcvr, shut it down
-  if (d_xcvr.use_count() == 1){
+  if (d_xcvr->usrp() == usrp()){
+    //std::cerr << "db_xcvr2450_base::shutdown_common: same -> shutting 
down\n";
     d_xcvr->shutdown();
   }
+  else {
+    //std::cerr << "db_xcvr2450_base::shutdown_common: different -> 
ignoring\n";
+  }
 }
 
 struct freq_result_t





reply via email to

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