[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9276 - gnuradio/branches/developers/trondeau/dbs/usrp
From: |
trondeau |
Subject: |
[Commit-gnuradio] r9276 - gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy |
Date: |
Wed, 13 Aug 2008 21:27:17 -0600 (MDT) |
Author: trondeau
Date: 2008-08-13 21:27:17 -0600 (Wed, 13 Aug 2008)
New Revision: 9276
Modified:
gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy/db_base.i
Log:
for backwards compatability with some Python examples, this provides a Python
interface to the real tune function
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-14 03:24:26 UTC (rev 9275)
+++ gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy/db_base.i
2008-08-14 03:27:17 UTC (rev 9276)
@@ -114,8 +114,11 @@
// 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
%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())
+ def tune(u, chan, subdev, target_freq):
+ return subdev.tune(chan, target_freq)
%}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9276 - gnuradio/branches/developers/trondeau/dbs/usrp/host/lib/legacy,
trondeau <=