Skip to content

Commit

Permalink
Merge pull request #192 from z3ntu/gpsd_nmea
Browse files Browse the repository at this point in the history
QGPSDDevice: tell gpsd to send nmea data
  • Loading branch information
Krakonos authored Sep 23, 2019
2 parents 4903187 + d0d7251 commit ebd2711
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/GPS/qgpsdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,10 +1136,10 @@ void QGPSDDevice::run()
GPSSlotForwarder Forward(this);
QTcpSocket Link;
Server = &Link;
Link.connectToHost(M_PREFS->getGpsdHost(),M_PREFS->getGpsdPort());
connect(Server,SIGNAL(connected()),&Forward,SLOT(onLinkReady()));
connect(Server,SIGNAL(readyRead()),&Forward,SLOT(onDataAvailable()));
connect(this,SIGNAL(doStopDevice()),&Forward,SLOT(onStop()));
Link.connectToHost(M_PREFS->getGpsdHost(),M_PREFS->getGpsdPort());
exec();
}

Expand Down Expand Up @@ -1252,9 +1252,7 @@ void QGPSDDevice::parseO(const QString& s)
void QGPSDDevice::onLinkReady()
{
if (!Server) return;
Server->write("w+");
Server->write("r+");
Server->write("j=1");
Server->write("?WATCH={\"enable\":true,\"nmea\":true}");
}
#endif /*USE_GPSD_LIB*/

Expand Down

0 comments on commit ebd2711

Please sign in to comment.