summaryrefslogtreecommitdiff
path: root/gr-analog/lib/sig_source_X_impl.cc.t
diff options
context:
space:
mode:
authorJohannes Demel <ufcsy@student.kit.edu>2015-11-12 11:33:26 +0100
committerJohannes Demel <ufcsy@student.kit.edu>2015-11-12 11:37:16 +0100
commitbc05f646de19ae1e29e9704b16a5b879a3340eca (patch)
tree571e521238779aac661176bb598b880bd1c64eb0 /gr-analog/lib/sig_source_X_impl.cc.t
parent8737d63030ecaac05793900e71c6a14a05ff0e7a (diff)
analog: added freq msg port to sig_source
Diffstat (limited to 'gr-analog/lib/sig_source_X_impl.cc.t')
-rw-r--r--gr-analog/lib/sig_source_X_impl.cc.t5
1 files changed, 4 insertions, 1 deletions
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@()