mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +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));
|
||||
}
|
||||
|
||||
int GpsLocation::getGpsNum() const
|
||||
{
|
||||
return geoSettings.value("count", 0).toInt();
|
||||
}
|
||||
|
||||
struct gpsTracker {
|
||||
degrees_t latitude;
|
||||
degrees_t longitude;
|
||||
|
|
|
@ -14,6 +14,7 @@ class GpsLocation : QObject
|
|||
public:
|
||||
GpsLocation(QObject *parent);
|
||||
bool applyLocations();
|
||||
int getGpsNum() const;
|
||||
|
||||
private:
|
||||
QGeoPositionInfo lastPos;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue