diff options
Diffstat (limited to 'gr-qtgui/lib/sink_c_impl.cc')
-rw-r--r-- | gr-qtgui/lib/sink_c_impl.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc index ba34eaaa32..77f87c1e0c 100644 --- a/gr-qtgui/lib/sink_c_impl.cc +++ b/gr-qtgui/lib/sink_c_impl.cc @@ -63,7 +63,8 @@ namespace gr { d_center_freq(fc), d_bandwidth(bw), d_name(name), d_plotfreq(plotfreq), d_plotwaterfall(plotwaterfall), d_plottime(plottime), d_plotconst(plotconst), - d_parent(parent) + d_parent(parent), + d_port(pmt::mp("freq")) { // Required now for Qt; argc must be greater than 0 and argv // must have at least one valid character. Must be valid through @@ -75,9 +76,9 @@ namespace gr { // setup output message port to post frequency when display is // double-clicked - message_port_register_out(pmt::mp("freq")); - message_port_register_in(pmt::mp("freq")); - set_msg_handler(pmt::mp("freq"), + message_port_register_out(d_port); + message_port_register_in(d_port); + set_msg_handler(d_port, boost::bind(&sink_c_impl::handle_set_freq, this, _1)); d_main_gui = NULL; @@ -328,8 +329,8 @@ namespace gr { { if(d_main_gui->checkClicked()) { double freq = d_main_gui->getClickedFreq(); - message_port_pub(pmt::mp("freq"), - pmt::cons(pmt::mp("freq"), + message_port_pub(d_port, + pmt::cons(d_port, pmt::from_double(freq))); } } |