discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 156, Issue 8


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!

I’m certainly capable and up to the task.  I wanted to make sure I hadn’t missed something obvious or documented before I started reinventing the wheel.

I wonder if the community agrees that this is something that would be useful.  If so, I’d expose this so that it could be accessed from Python.  If not, y’all won’t care what I do anyway. :)

Thanks!

On Nov 8, 2015, at 12:00 PM, address@hidden wrote:

Date: Sun, 8 Nov 2015 12:16:18 +0100
From: Marcus M?ller <address@hidden>
To: address@hidden
Subject: Re: [Discuss-gnuradio] Drawing lines on WX or QT
instrumentation?
Message-ID: <address@hidden>
Content-Type: text/plain; charset="utf-8"

Hi David,

I don't think that this has been implemented; it's definitely not
impossible, though!

So, the point is that the FrequencyDisplayForm [1] does have a
d_marker_cf member which, as far as I can tell, is there, and can be set
to a different color and en- and disabled. However,

 * that functionality, as far as I can tell, isn't actually in use by
   the freq_sink[2], and
 * there's no way to set the coordinate of that line (it's at x=0).

But, as mentioned, that'd be relatively easy to solve. Do you feel up to
coding a bit of C++, or would you need help with that?

Cheers,
Marcus



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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