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:
Dirk Hohndel 2015-11-13 09:17:13 -08:00
parent 4b39971978
commit 6a70793ba8
3 changed files with 8 additions and 1 deletions

View file

@ -74,6 +74,11 @@ void GpsLocation::status(QString msg)
qmlUiShowMessage(qPrintable(msg));
}
int GpsLocation::getGpsNum() const
{
return geoSettings.value("count", 0).toInt();
}
struct gpsTracker {
degrees_t latitude;
degrees_t longitude;

View file

@ -14,6 +14,7 @@ class GpsLocation : QObject
public:
GpsLocation(QObject *parent);
bool applyLocations();
int getGpsNum() const;
private:
QGeoPositionInfo lastPos;

View file

@ -154,7 +154,8 @@ void QMLManager::applyGpsData()
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)