commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9719 - gnuradio/branches/features/cppdb/usrp/host/lib


From: trondeau
Subject: [Commit-gnuradio] r9719 - gnuradio/branches/features/cppdb/usrp/host/lib/legacy
Date: Sat, 4 Oct 2008 16:15:11 -0600 (MDT)

Author: trondeau
Date: 2008-10-04 16:15:10 -0600 (Sat, 04 Oct 2008)
New Revision: 9719

Modified:
   gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc
   gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.h
   gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.i
Log:
Fixes usrp_siggen.py requiring access to _which. I don't like doing this in the 
C++, but I can't figure out how to a value to an object in the Python code 
through swig.

Modified: gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc
===================================================================
--- gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc    
2008-10-04 21:51:44 UTC (rev 9718)
+++ gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc    
2008-10-04 22:15:10 UTC (rev 9719)
@@ -42,6 +42,9 @@
   d_tx = tx;
   d_usrp = usrp;
 
+  // FIXME: this is a stupid response some the Python examples requiring _which
+  _which = which;
+
   if(d_tx) {
     d_slot = d_which * 2;
   }

Modified: gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.h
===================================================================
--- gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.h     
2008-10-04 21:51:44 UTC (rev 9718)
+++ gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.h     
2008-10-04 22:15:10 UTC (rev 9719)
@@ -92,6 +92,10 @@
 
   tune_result tune(int chan, double target_freq);
 
+  int which() { return d_which; }
+
+  int _which;
+
  protected:
   void _enable_refclk(bool enable);
   virtual double _refclk_freq();

Modified: gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.i
===================================================================
--- gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.i     
2008-10-04 21:51:44 UTC (rev 9718)
+++ gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.i     
2008-10-04 22:15:10 UTC (rev 9719)
@@ -74,12 +74,13 @@
   void select_rx_antenna(int which_antenna);
 
   tune_result tune(int chan, double target_freq);
+
+  int _which;
 };
 
 typedef boost::shared_ptr<db_base> db_base_sptr;
 %template(db_base_sptr) boost::shared_ptr<db_base>;
 
-
 // Set better class name in Python
 // Enable freq_range and gain_range from public methods of class not 
implemented in C++
 // And create a dummy wrapper for backwards compatability with some of the 
example code





reply via email to

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