commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 03/13: freq_xlating_fir: added pmt::dict co


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/13: freq_xlating_fir: added pmt::dict command handling
Date: Sat, 17 Oct 2015 17:26:53 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 367068073c1a7db8de86c6b7f3ca2a81481554e0
Author: Marcus Müller <address@hidden>
Date:   Fri Oct 16 17:57:13 2015 +0200

    freq_xlating_fir: added pmt::dict command handling
---
 gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t 
b/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
index a9e70e7..f45426d 100644
--- a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
+++ b/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
@@ -128,7 +128,13 @@ namespace gr {
     void
     @IMPL_NAME@::handle_set_center_freq(pmt::pmt_t msg)
     {
-      if(pmt::is_pair(msg)) {
+      if(pmt::is_dict(msg) && pmt::dict_has_key(msg, pmt::intern("freq")) ) {
+        pmt::pmt_t x = pmt::dict_ref(msg, pmt::intern("freq"), pmt::PMT_NIL );
+        if(pmt::is_real(x)) {
+          double freq = pmt::to_double(x);
+          set_center_freq(freq);
+        }
+      } else if(pmt::is_pair(msg)) {
         pmt::pmt_t x = pmt::cdr(msg);
         if(pmt::is_real(x)) {
           double freq = pmt::to_double(x);



reply via email to

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