-
Notifications
You must be signed in to change notification settings - Fork 105
Update of Duration recording gpx Fixed #4703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Sources/Helpers/OAGPXUIHelper.mm
Outdated
| + (long)liveTimeSpanForGpx:(OASGpxFile *)gpx withoutGaps:(BOOL)withoutGaps | ||
| { | ||
| long totalActiveDuration = 0; | ||
| long earliestSegmentStart = LLONG_MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LONG_MAX ?
Sources/Helpers/OAGPXUIHelper.mm
Outdated
| for (OASTrkSegment *segment in track.segments) | ||
| { | ||
| NSArray<OASWptPt *> *points = segment.points; | ||
| if (points.count <= 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (points.count < 2) {}
Sources/Helpers/OAGPXUIHelper.mm
Outdated
| } | ||
| } | ||
|
|
||
| if (earliestSegmentStart == LLONG_MAX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LONG_MAX
| ((!currentTrack.tracks || currentTrack.tracks.count == 0) || currentTrack.tracks[0].generalTrack); | ||
|
|
||
| OASGpxTrackAnalysis *analysis = [currentTrack getAnalysisFileTimestamp:0]; | ||
| long timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we have same code in java (android). Why it works correctly in android and wrong in ios?
No description provided.