mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-09 20:53:07 +02:00
Moving time: re-implement idle/non-idle TrackPoints.
Simplify computation of TrackStatistics. Part of #1046.
This commit is contained in:
@@ -171,7 +171,13 @@ class TrackRecordingManager {
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(TAG, "Not recording TrackPoint, idle");
|
||||
if (lastStoredTrackPoint != null && trackPoint.isMoving() != lastStoredTrackPoint.isMoving()) {
|
||||
// Moving from non-moving to moving or vice versa; required to compute moving time correctly.
|
||||
insertTrackPoint(trackId, trackPoint);
|
||||
return true;
|
||||
}
|
||||
|
||||
Log.d(TAG, "Not recording TrackPoint");
|
||||
lastTrackPoint = trackPoint;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user