I have added Griffin Powermate knob support.

497 views
Skip to first unread message

Bob, WD8RDE

unread,
Feb 16, 2014, 10:43:18 PM2/16/14
to gq...@googlegroups.com
I have just finished adding Griffin Powermate support to gqrx under linux. I based it off the powermate.cpp class used on QTRadio, but added the crtl/shift key behaviours, as well as FFT zoom when the knob is depressed and rotated. It works really nice :)
I have a current git of trunk, could I submit this to the github repository. How do I do this?
Sorry I am a bit of a newbie on open source collaborating. Although I am an experienced programmer, my employer does allow me to share my work related code.

Alexandru Csete

unread,
Feb 17, 2014, 9:11:40 AM2/17/14
to gq...@googlegroups.com
Hi Bob,

Thanks for your mail.

First you should make your changes available for review. If you have a
github account you can simply fork the gqrx repository and make the
changes to your fork. I can then review and comment on the changes.
You can also simply send a diff between your local repository and the
official repository. either will work for me.

I have to say though that I have taken a look at
https://github.com/alexlee188/ghpsdr3-alex/blob/master/trunk/src/QtRadio/powermate.cpp
and I don't particularly like what I am seeing. It appears to be input
device handling code which i my opinion does not belong in a GUI.
Surely there must be a way to map a rotation and a button press to
existing mouse events? Also, the fact that it is linux-only makes it
pretty much a no-go from my point of view.

Alex

Bob, WD8RDE

unread,
Feb 17, 2014, 11:43:32 AM2/17/14
to gq...@googlegroups.com
1) I have posted my fork. https://github.com/wd8rde/gqrx-linux-powermate
2) I was managing the Unix only build issue by wrapping the code in #ifdef POWERMATE, then adding POWERMATE to the DEFINES in the gqrx.pro file. I know that is not pretty, but it solved the issues
3) As far as mapping to mouse wheel events, after reading your reply I re-visited seeing if I could install the Powermate as a mouse wheel under X11. I hit on two programs, imwheel, and evrouter.
imwheel looks like It translates everything to keyboard button presses, so I discarded using it, and concentrated on evrouter a bit.
evrouter works easily enough, but the integration with gqrx is unsatisfactory, because I cannot issue commands to the co-ordinates of the FFT sub-window, or the freq/db FFT window scales. So all I can do is tune up/down.

Robert Bouterse

unread,
Feb 18, 2014, 10:50:56 AM2/18/14
to gq...@googlegroups.com
On, even further thought. Perhaps the way to approach this is by adding a key press UI to gqrx. Then the Powermate may be tied in by the user using imwheel or the Powermate driver on Windows and Mac.

Sorry, I am very new to QT - its been four days now:)


--
You received this message because you are subscribed to the Google Groups "Gqrx SDR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gqrx+uns...@googlegroups.com.
To post to this group, send email to gq...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gqrx/0aa0f683-f494-4add-bfed-61878d7aa4e8%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Alexandru Csete

unread,
Feb 18, 2014, 5:53:23 PM2/18/14
to gq...@googlegroups.com
On Tue, Feb 18, 2014 at 4:50 PM, Robert Bouterse <wd8...@gmail.com> wrote:
> On, even further thought. Perhaps the way to approach this is by adding a
> key press UI to gqrx. Then the Powermate may be tied in by the user using
> imwheel or the Powermate driver on Windows and Mac.

I think that's exactly the right way to approach it. Acting on mouse
and keyboard events is fundamental functionality in GUIs and easy to
implement. Qt has very good support for it.

The first and most important task here would be to specify which key
presses gqrx should react to and what they should do. This is
important both for programming and for later documentation.

Note that up/down/left/right arrows are already bound to the frequency
digits if you move the mouse over the area. Maybe we can take
advantage of this already. I can fix the focus problem.


> Sorry, I am very new to QT - its been four days now:)

So, what do you think about Qt?

Alex

WD8RDE

unread,
Feb 18, 2014, 9:46:05 PM2/18/14
to gq...@googlegroups.com
QT - well, so far not bad. I am frustrated by the lack of non blocking file IO. That seems to be the signpost of demons ahead :) But when you venture into the work of cross platform UI frameworks, it always comes down to the least common denominator. I can work with it, but I may swear a bit :)

I do have some QT questions. For instance, I can't find the connect statement for the "emit newCenterFreq" signal. None of the QT documentation says anything about coding a on_classinstance_signal(args) syntax, but that seems to be exactly what you did. Can you explain?

The mapping of the keys was a subject I was going to bring up in my email, but I thought I would ease into the subject to see how you felt about it. I think we need to work up a spreadsheet of key combinations (press/release) VS action. I could take a swag at it, please be patient, I do have a day job :) Can you deal with an ODS format? I don't have Winders. Or, can you think of a better way to approach this?

I must admit, I have an ulterior motive. I have a hair-brained idea, that I don't think the general user base would be interested in, but I want to interface a Denon MC2000 in as a control panel. It is a MIDI device, but I should be able to do the key mapping. So you see, the key-mapped UI solves even the weird problems.

Alexandru Csete

unread,
Feb 21, 2014, 4:58:41 PM2/21/14
to gq...@googlegroups.com
On Wed, Feb 19, 2014 at 3:46 AM, WD8RDE <wd8...@gmail.com> wrote:
>
> I do have some QT questions. For instance, I can't find the connect
> statement for the "emit newCenterFreq" signal. None of the QT documentation
> says anything about coding a on_classinstance_signal(args) syntax, but that
> seems to be exactly what you did. Can you explain?

https://qt-project.org/doc/qt-5.0/qtdesigner/designer-using-a-ui-file.html#automatic-connections
and probably also other places.

> The mapping of the keys was a subject I was going to bring up in my email,
> but I thought I would ease into the subject to see how you felt about it. I
> think we need to work up a spreadsheet of key combinations (press/release)
> VS action. I could take a swag at it, please be patient, I do have a day job
> :) Can you deal with an ODS format? I don't have Winders. Or, can you think
> of a better way to approach this?

I was under the impression that we were talking about a handful of key
bindings, if so, simple text format in email here should be
sufficient. I just want to get an idea what functions are needed to
see if there are sufficient handles for them.

> I must admit, I have an ulterior motive. I have a hair-brained idea, that I
> don't think the general user base would be interested in, but I want to
> interface a Denon MC2000 in as a control panel. It is a MIDI device, but I
> should be able to do the key mapping. So you see, the key-mapped UI solves
> even the weird problems.

Not everything need to be programmed into the application. I have
added a TCP interface that can be used by external application for
limited control: http://gqrx.dk/doc/remote-control

Alex

Robert Bouterse

unread,
Feb 24, 2014, 11:01:29 AM2/24/14
to gq...@googlegroups.com
Sorry, I didn't reply quicker, I got distracted by a Hamfest purchase this weekend.

Yes, let's do a constrained set of keys. I need to think about which ones they will be. But, the mechanism I put in place for them should be able to be expanded, and maybe I should just hang it off of the remote control interface.

Alex

--
You received this message because you are subscribed to the Google Groups "Gqrx SDR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gqrx+uns...@googlegroups.com.
To post to this group, send email to gq...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages