Buttons in GNU Radio flowgraph

743 views
Skip to first unread message

Miguel A. Vallejo

unread,
May 3, 2012, 6:09:20 AM5/3/12
to ultra-c...@googlegroups.com

Any GNU Radio expert out there?

I'm writting a flowgraph to receive channelized signals so I found convenient to add a pair of up/down buttons to change frequency instead of wtitting every time a whole new frequency.

I googled but nothing found. Any ideas?

Miguel A. Vallejo, EA4EOZ

Adam Nielsen

unread,
May 3, 2012, 6:18:05 AM5/3/12
to ultra-c...@googlegroups.com
> Any GNU Radio expert out there?

They're probably all on the gnuradio list with their USRPs :-)

> I'm writting a flowgraph to receive channelized signals so I found convenient
> to add a pair of up/down buttons to change frequency instead of wtitting every
> time a whole new frequency.
>
> I googled but nothing found. Any ideas?

You don't say which GUI you're using (WX or QT). WX has a slider you could
use to slide between the lowest and highest channels, would that work?

Cheers,
Adam.

Miguel A. Vallejo

unread,
May 3, 2012, 7:10:19 AM5/3/12
to ultra-c...@googlegroups.com
Adam Nielsen wrote:

>>> >>> Any GNU Radio expert out there?
>>> They're probably all on the gnuradio list with
>>> their USRPs :-)


:-D

Well, I do not really need an expert. A simple user will be ok for my simple questions.


>>> You don't say which GUI you're using (WX or QT).
>>> WX has a slider you could use to slide between the
>>> lowest and highest channels, would that work?


So... there are two GUIs available... I didn't have any idea!

Well, since I used the slider for setting the tuner's gain and and offset, I supose I'm using WX GUI.

But I don't like how that slider works. It's almost impossible to set an acurate value with it, even with only a few steps... I use one slider to correct the tuner offset from -10 to +10 kHz in 1 kHz steps. It is impossible to set the required value using the mouse and the slider so I always end writing the desired value in the text box.

What I really need are buttons. Up & Down buttons.

Thank you!

Adam Nielsen

unread,
May 3, 2012, 7:57:36 AM5/3/12
to ultra-c...@googlegroups.com
> But I don't like how that slider works. It's almost impossible to set an
> acurate value with it, even with only a few steps... I use one slider to
> correct the tuner offset from -10 to +10 kHz in 1 kHz steps. It is impossible
> to set the required value using the mouse and the slider so I always end
> writing the desired value in the text box.

Could you lower the range of the slider (or make it physically larger on the
screen) so that it's not so sensitive? How many channels do you need to
switch between? Adjusting from -10 to +10 in 1kHz steps should be very easy
to control.

I haven't actually tried it, but you should be able to use the mouse wheel on
it or click on it and use the arrow keys on the keyboard for finer control.

> What I really need are buttons. Up & Down buttons.

It doesn't look like there's anything like that at present. WX does support
this (IIRC it's called a "spin control") but someone would need to write a
GNURadio block to make it available from within GRC.

Cheers,
Adam.

Miguel A. Vallejo

unread,
May 3, 2012, 8:08:35 AM5/3/12
to ultra-c...@googlegroups.com
Adam Nielsen wrote:

>>> Could you lower the range of the slider (or make it
>>> physically larger on the screen) so that it's not so sensitive?


No, I can´t


>>>  How many channels do you need to switch between?

About 300 :-(


>>>  Adjusting from -10 to +10 in 1kHz steps should be very easy to control.

It should, but it is not. I suspect from the high cpu load from the FFT display, which make all the flowgraph controls to run slooooow until the point its usability is compromised.

Where is the spin control? It os not in my gnuradio and I think it could do the job if step size is configurable.

Adam Nielsen

unread,
May 3, 2012, 8:15:19 AM5/3/12
to ultra-c...@googlegroups.com
> *>>> Could you lower the range of the slider (or make it
> >>> physically larger on the screen) so that it's not so sensitive?*
>
> No, I can´t

Why not?

> *>>> Adjusting from -10 to +10 in 1kHz steps should be very easy to control. *
>
> It should, but it is not. I suspect from the high cpu load from the FFT
> display, which make all the flowgraph controls to run slooooow until the point
> its usability is compromised.

And the arrow keys on the keyboard don't work? I found in these situations
turning off the FFT didn't actually make the GUI more responsive, I think it's
something else at fault.

> Where is the spin control? It os not in my gnuradio and I think it could do
> the job if step size is configurable.

http://docs.wxwidgets.org/trunk/classwx_spin_ctrl.html

As I said before though, you will have to write some code to make this class
available from within GRC. Maybe you can edit the existing textbox code and
tweak it to add the up/down buttons provided by the spin control?

Cheers,
Adam.

Miguel A. Vallejo

unread,
May 3, 2012, 9:35:09 AM5/3/12
to ultra-c...@googlegroups.com
Adam Nielsen wrote:

>>> >>> >>> Could you lower the range of the slider (or make it
>>> >>> >>> physically larger on the screen) so that it's not so sensitive?*
>>> >>> No, I can´t
>>> Why not?


8 MHz, 25 kHz channels, do the math...


>>> And the arrow keys on the keyboard don't work?

Mmmm, good idea. I didn't try.


>>> As I said before though, you will have to write
>>> some code to make this class available from within
>>> GRC.  Maybe you can edit the existing textbox code
>>> and tweak it to add the up/down buttons provided
>>> by the spin control?

I see... I need to use something it is for sure in any standard GNU Radio instalation. Personalizations and custom add-ons are usualy a endless source of problems so I'll not use them.

Thank you!

Balint Seeber

unread,
May 8, 2012, 9:46:39 AM5/8/12
to ultra-c...@googlegroups.com
I would suggest:
  1. Use a slider with the range 0-319 with step 1 (or 320 if you want inclusive, etc).
  2. Where you need to set the tuning for the 8 MHz chunk offset in another block (e.g. frequency parameter in the source block), type in a formula using the slider's ID. E.g. 25000 * chnl_num
If you need to apply a constant offset, just add '+ 12500' on the end of the formula, for instance.
Then you can use the keyboard/mouse wheel to flick between channels, or type in the channel number directly.

Miguel A. Vallejo

unread,
May 8, 2012, 8:02:16 PM5/8/12
to ultra-c...@googlegroups.com
Balint Seeber wrote:

>>> I would suggest:
>>>
>>> 1 - Use a slider with the range 0-319 with step 1 (or 320 if you want inclusive, etc).
>>>
>>> 2 -
Where you need to set the tuning for the 8 MHz chunk offset in another block

>>> (e.g. frequency parameter in the source block), type in a formula using the slider's
>>> ID. E.g. 25000 * chnl_num
>>>
>>>
If you need to apply a constant offset, just add '+ 12500' on the end of the

>>> formula, for instance. Then you can use the keyboard/mouse wheel to flick
>>> between channels, or type in the channel number directly.


Thanks Balint, but I'll try a XMLRCP solution to set the frequency externally with another program. It will be easier to handle.


Reply all
Reply to author
Forward
0 new messages