gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] External main loop. Was: Correct way to handle 5 Hz on


From: Lisandro Damián Nicanor Pérez Meyer
Subject: Re: [gpsd-users] External main loop. Was: Correct way to handle 5 Hz on an application
Date: Wed, 24 Oct 2018 13:50:41 -0300

El miércoles, 24 de octubre de 2018 13:25:28 -03 Gary E. Miller escribió:
> Yo Lisandro!
> 
> On Wed, 24 Oct 2018 10:20:45 -0300
> 
> Lisandro Damián Nicanor Pérez Meyer <address@hidden> wrote:
> > > If you look at base.watch() in xgps you see how easy it is to set up
> > > the Qt callback (5 lines).
> > 
> > Except gpsd currently only supports Qt4. Yes, I have seen the [bug
> > report]
> > 
> > [bug report] <https://savannah.nongnu.org/bugs/?52299>
> 
> If anyone really cared then Qt5 support could be quickly added.  Is that
> all you need?

Right now, yes. But the library name change is mandatory to allow both Qt4 and 
Qt5 versions coexist, in case a user need both (and also help distro packagers 
to provide both versions at the same time).

> I always thought the Qt4 layer was redundant.  Mostly just an example.
> 
> > > I can't think of a reason not to do that, or to do that, but I'm
> > > not a Qt guy.  But I do know the xgps way to use gpsd with Qt is
> > > pretty simple and solid.
> > 
> > Right, but they create their own main loop.
> 
> Right, Qt creates a main loop.  Use their loop, or another one.  No way
> around it.  that is how computers work.  "callbacks" are just an
> obfuscation of that fact.

And the easiest way to use Qt's loop is to use the QTcpSocket exposed in 
struct gps_data_t to notify the user of incoming data, thus avoiding 
gps_waiting().

> > Now that I have read a nice amount of gpsd's code I see that there is
> > currently no public code to do this,
> 
> Why do you think xgps, which is Qt, is not doing what you need?

It is not Qt, it's Gtk. And it's python, I need C/C++.

Thanks!

-- 
~/ sweet ~/

Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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