From bc05f646de19ae1e29e9704b16a5b879a3340eca Mon Sep 17 00:00:00 2001
From: Johannes Demel <ufcsy@student.kit.edu>
Date: Thu, 12 Nov 2015 11:33:26 +0100
Subject: analog: added freq msg port to sig_source

---
 gr-analog/lib/sig_source_X_impl.cc.t | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'gr-analog/lib/sig_source_X_impl.cc.t')

diff --git a/gr-analog/lib/sig_source_X_impl.cc.t b/gr-analog/lib/sig_source_X_impl.cc.t
index 5e0cace9c4..227d4ba46e 100644
--- a/gr-analog/lib/sig_source_X_impl.cc.t
+++ b/gr-analog/lib/sig_source_X_impl.cc.t
@@ -52,7 +52,10 @@ namespace gr {
       d_sampling_freq(sampling_freq), d_waveform(waveform),
       d_frequency(frequency), d_ampl(ampl), d_offset(offset)
     {
-      d_nco.set_freq(2 * M_PI * d_frequency / d_sampling_freq);
+      set_frequency(frequency);
+      
+      message_port_register_in(pmt::mp("freq"));
+      set_msg_handler(pmt::mp("freq"), boost::bind(&@IMPL_NAME@::set_frequency_msg, this, _1));
     }
 
     @IMPL_NAME@::~@IMPL_NAME@()
-- 
cgit v1.2.3