TrackRecordingManager: do not store sensor distance twice (previous TrackPoint's storage was delayed).

Fixes #969.
This commit is contained in:
Dennis Guse
2021-10-07 22:51:06 +02:00
parent f6b994572a
commit 90493ae498
4 changed files with 17 additions and 8 deletions
@@ -207,6 +207,8 @@ class TrackRecordingManager {
Log.w(TAG, "Ignore insertTrackPoint. trackPoint time same as last valid trackId point time.");
} else {
insertTrackPointHelper(trackId, lastTrackPoint);
// Remove the sensorDistance from trackPoint that is already going be stored with lastTrackPoint.
trackPoint.minusSensorDistance(lastTrackPoint);
}
lastTrackPoint = null;
}