commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9267 - gnuradio/branches/developers/trondeau/dbs/usrp


From: trondeau
Subject: [Commit-gnuradio] r9267 - gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy
Date: Wed, 13 Aug 2008 15:27:41 -0600 (MDT)

Author: trondeau
Date: 2008-08-13 15:27:40 -0600 (Wed, 13 Aug 2008)
New Revision: 9267

Modified:
   gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy/db_base.i
Log:
adding gain_range function threw swig

Modified: 
gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy/db_base.i
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy/db_base.i    
2008-08-13 21:11:54 UTC (rev 9266)
+++ gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy/db_base.i    
2008-08-13 21:27:40 UTC (rev 9267)
@@ -112,7 +112,10 @@
   float freq_max();
 };
 
+// Set better class name in Python
+// Enable freq_range and gain_range from public methods of class not 
implemented in C++
 %pythoncode %{
   db_base_sptr.__repr__ = lambda self: "<db_base::%s>" % (self.name(),)
   db_base_sptr.freq_range = lambda self: (self.freq_min(), self.freq_max(), 1)
+  db_base_sptr.gain_range = lambda self: (self.gain_min(), self.gain_max(), 
self.gain_db_per_step())
 %}





reply via email to

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