mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Location service: report number of recorded GPS fixes
This is mostly for debugging, to make sure that the recording of GPS fixes works as expected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4b39971978
commit
6a70793ba8
3 changed files with 8 additions and 1 deletions
|
@ -74,6 +74,11 @@ void GpsLocation::status(QString msg)
|
||||||
qmlUiShowMessage(qPrintable(msg));
|
qmlUiShowMessage(qPrintable(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int GpsLocation::getGpsNum() const
|
||||||
|
{
|
||||||
|
return geoSettings.value("count", 0).toInt();
|
||||||
|
}
|
||||||
|
|
||||||
struct gpsTracker {
|
struct gpsTracker {
|
||||||
degrees_t latitude;
|
degrees_t latitude;
|
||||||
degrees_t longitude;
|
degrees_t longitude;
|
||||||
|
|
|
@ -14,6 +14,7 @@ class GpsLocation : QObject
|
||||||
public:
|
public:
|
||||||
GpsLocation(QObject *parent);
|
GpsLocation(QObject *parent);
|
||||||
bool applyLocations();
|
bool applyLocations();
|
||||||
|
int getGpsNum() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QGeoPositionInfo lastPos;
|
QGeoPositionInfo lastPos;
|
||||||
|
|
|
@ -154,7 +154,8 @@ void QMLManager::applyGpsData()
|
||||||
|
|
||||||
QString QMLManager::logText() const
|
QString QMLManager::logText() const
|
||||||
{
|
{
|
||||||
return m_logText;
|
QString logText = m_logText + QString("\nNumer of GPS fixes: %1").arg(locationProvider->getGpsNum());
|
||||||
|
return logText;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMLManager::setLogText(const QString &logText)
|
void QMLManager::setLogText(const QString &logText)
|
||||||
|
|
Loading…
Reference in a new issue