summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-14 11:07:41 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-14 13:37:44 -0700
commitca3be8f376784cedbcf9c2bf8b11d2764f82036e (patch)
treef6a8f029277d0d7bb99e6c1019a31f5ba2f7130d /core
parent82a3d2be954cedae9cb9d9b20e3b97facdd7a3b0 (diff)
downloadsubsurface-ca3be8f376784cedbcf9c2bf8b11d2764f82036e.tar.gz
GPS: add signal to show that a new fix has been acquired
This way if we don't have a current enough position we can wait for a current fix to be acquired. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/gpslocation.cpp1
-rw-r--r--core/gpslocation.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp
index 30913168c..9b01402bc 100644
--- a/core/gpslocation.cpp
+++ b/core/gpslocation.cpp
@@ -171,6 +171,7 @@ void GpsLocation::newPosition(QGeoPositionInfo pos)
QString msg("received new position %1 after delta %2 threshold %3 (now %4 last %5)");
status(qPrintable(msg.arg(pos.coordinate().toString()).arg(delta).arg(prefs.time_threshold).arg(pos.timestamp().toString()).arg(QDateTime().fromSecsSinceEpoch(lastTime).toString())));
waitingForPosition = false;
+ acquiredPosition();
gpsTracker gt;
gt.when = pos.timestamp().toTime_t();
gt.when += gettimezoneoffset(gt.when);
diff --git a/core/gpslocation.h b/core/gpslocation.h
index 4d48acd59..fb4f4c802 100644
--- a/core/gpslocation.h
+++ b/core/gpslocation.h
@@ -59,6 +59,7 @@ private:
signals:
void haveSourceChanged();
+ void acquiredPosition();
public slots:
void serviceEnable(bool toggle);