|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 156, Issue 8 |
Date: | Mon, 9 Nov 2015 11:27:54 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
Hehe :) So, ok, here's the deal: It's a bit indirect, but not overly complex :) there's already a CF marker in FrequencyDisplayPlot.cc (that's the actual plotting widget); search for CF in the source code. That one is initialized in the constructor, and immediately hidden. What you'd need to do is add a method that sets that marker's x coordinate, and add that to both FrequencyDisplayPlot.cc and ~.h (under "slots:"). If I'm not mistaken, you'd then (Qt signal/slot style) connect() that slot in freqdisplayform.cc (that's the container of the plot and things like the optional settings forms etc). Then you'd extend the freq_sink_ {c,f}_impl's message handler to deal with messages specifying some "marker_frequency" or so by emitting a Qt signal to freqdisplayform (Tom, if you read this: am I right?). Especially for that last part, I've got code lying around, so don't hesitate to ask for code snippets :) That way, you can set frequency thread-safely through a message (you can see the message ports in GRC if you enable them in the frequency sink's properties dialog), and that will automatically work with python. You can also add a setter method, and for the sake of simplicity, that might just post a message to itself and let the message handler do its job, or the other way around, let the message handler call the method and do the emitting there. Cheers, Marcus On 08.11.2015 22:13, David Hoelzer
wrote:
Thank you Marcus! |
[Prev in Thread] | Current Thread | [Next in Thread] |