From aa4e3ba537344b34aac738ffedf1b88245d3388a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 24 Mar 2016 08:49:45 -0700 Subject: Give more information about the GPS location service On iOS it seems that I get a fix every second. Even though the QGeoPositionInfoSource is set up with an update interval of 5 minutes... Signed-off-by: Dirk Hohndel --- subsurface-core/gpslocation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'subsurface-core') diff --git a/subsurface-core/gpslocation.cpp b/subsurface-core/gpslocation.cpp index 9f1961cbf..6a65ddeff 100644 --- a/subsurface-core/gpslocation.cpp +++ b/subsurface-core/gpslocation.cpp @@ -59,8 +59,7 @@ QGeoPositionInfoSource *GpsLocation::getGpsSource() #ifndef SUBSURFACE_MOBILE if (verbose) #endif - status("created GPS source"); - QString msg = QString("have position source %1").arg(m_GpsSource->sourceName()); + status(QString("Created position source %1").arg(m_GpsSource->sourceName())); connect(m_GpsSource, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(newPosition(QGeoPositionInfo))); connect(m_GpsSource, SIGNAL(updateTimeout()), this, SLOT(updateTimeout())); m_GpsSource->setUpdateInterval(5 * 60 * 1000); // 5 minutes so the device doesn't drain the battery @@ -89,7 +88,7 @@ void GpsLocation::serviceEnable(bool toggle) } if (toggle) { gpsSource->startUpdates(); - status("Starting Subsurface GPS service"); + status(QString("Starting Subsurface GPS service with update interval %1").arg(gpsSource->updateInterval())); } else { gpsSource->stopUpdates(); status("Stopping Subsurface GPS service"); -- cgit v1.2.3-70-g09d2